Help! Filling an Array with Unfamiliar Series

In summary: J. K. Andersen (jka(AT)email.dk), Jul 07 2000In summary, The conversation was about an array with a series of numbers, but there was confusion about the series. The correct series is 1,4,9,25,36,54,45,56,68,106,87,98,100,203,140,154,160,174,165,263,246,243,157,234,276,280,338,308,343,371,335,299,427,394,497,475,473,405,524,467,577,485,586,509,492,644,464,677,563,616,582
  • #1
bkc82
6
0
I have a programming assignment to fill an array with this series: 1,4, 9, 25, 36, …. The problem is I don't know what this series is so I can't write the program. Can anyone help?
 
Mathematics news on Phys.org
  • #2
looks like a mistake to me, I think it should be 1,4,9,16,25,36 therefore: an = n2
 
  • #3
I guess that's why it was giving me so much trouble. Thanks.
 
  • #4
hmmm :S

http://www.research.att.com/~njas/sequences/eisBTfry00055.txt

%I A063577
%S A063577 1,4,9,25,36,54,45,56,68,106,87,98,100,203,140,154,160,174,165,263,246,
%T A063577 243,157,234,276,280,338,308,343,371,335,299,427,394,497,475,473,405,
%U A063577 524,467,577,485,586,509,492,644,464,677,563,616,582
%N A063577 Smallest power of 4 having just n 2's in its decimal representation.
%t A063577 a = {}; Do[k = 1; While[ Count[ IntegerDigits[4^k], 2] != n, k++ ]; a = Append[a, k],{n, 0, 50} ]; a
%Y A063577 Adjacent sequences: A063574 A063575 A063576 this_sequence A063578 A063579 A063580
%Y A063577 Sequence in context: A045967 A030140 A062503 this_sequence A087058 A046659 A063760
%K A063577 base,nonn
%O A063577 0,2
%A A063577 Robert G. Wilson v (rgwv(AT)rgwv.com), Aug 10 2001

%I A087058
%S A087058 4,9,25,36,64,81,100,144,169,225,256,289,361,400,484,529,625,676,729,
%T A087058 841,900,1024,1089,1156,1296,1369,1521,1600,1764,1849,1936,2116,2209,
%U A087058 2401,2500,2601,2809,2916,3136,3249,3364,3600,3721,3969,4096,4356,4489
%N A087058 Smallest square number greater than 2*n^2.
%F A087058 A087058(n) = A087057(n)^2 = (1 + A001951(n))^2 = (1 + floor[n*sqrt(2)])^2
%e A087058 A087058(10) = 225 because 225 is the smallest square number greater than 2*10^2 = 200.
%Y A087058 Cf. A001951, A087055, A087056, A087057, A087059, A087060.
%Y A087058 Adjacent sequences: A087055 A087056 A087057 this_sequence A087059 A087060 A087061
%Y A087058 Sequence in context: A030140 A062503 A063577 this_sequence A046659 A063760 A046451
%K A087058 easy,nonn
%O A087058 1,1
%A A087058 Jens Voss (jens(AT)voss-ahrensburg.de), Aug 07 2003

%I A046659
%S A046659 1,4,9,25,36,100,121,225,289,484,529,841,900,1089,1156,1681,2116,2209,
%T A046659 2601,2809,3364,3481,4356,4761,5041,6724,6889,7225,7569,7921,8836,
%U A046659 10201,10404,11236,11449,12769,13225,13924,15129,17161,18769,19044
%N A046659 Sum of divisors and sum of cubes of divisors are relatively prime.
%C A046659 It appears that (a) all the numbers are squares, (b) the number of divisors is a power of 3.
%C A046659 It can be shown that this is a subset of A028982.
%e A046659 x=100 with 9 divisors whose sum is 217=7*31 and sum of cubes of divisors is 1149823=19*73*829; GCD[ 217,1149823 ]=1
%Y A046659 Cf. A028982, A046679 - A046981, A046983, A046985.
%Y A046659 Adjacent sequences: A046656 A046657 A046658 this_sequence A046660 A046661 A046662
%Y A046659 Sequence in context: A062503 A063577 A087058 this_sequence A063760 A046451 A082200
%K A046659 nonn
%O A046659 1,2
%A A046659 Labos E. (labos(AT)ana1.sote.hu)
 
Last edited by a moderator:

1. How do I fill an array with an unfamiliar series?

To fill an array with an unfamiliar series, you will need to first understand the pattern or rule behind the series. Once you have identified the pattern, you can use a loop or a built-in array function to populate the array with the series values.

2. Can I use a loop to fill the array with an unfamiliar series?

Yes, you can use a loop to fill the array with an unfamiliar series. You will need to use a counter variable and the length of the array to determine the number of iterations needed to fill the array with the series values.

3. What is the advantage of using a loop to fill the array with an unfamiliar series?

The advantage of using a loop is that it allows for more flexibility in terms of the series values. You can easily change the starting point, increment, and number of iterations to fill the array with different series values.

4. Are there any built-in functions that can help with filling an array with an unfamiliar series?

Yes, many programming languages have built-in functions that can help with filling an array with an unfamiliar series. These functions usually take in parameters such as the starting point, increment, and number of elements to generate the series values.

5. How can I check if the array is filled correctly with the unfamiliar series?

You can use a loop or a built-in array function to print out the array elements and compare them to the expected series values. If they match, then the array is filled correctly with the unfamiliar series.

Similar threads

  • General Math
Replies
33
Views
2K
Replies
2
Views
785
Replies
1
Views
1K
  • General Math
Replies
8
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
Replies
3
Views
974
  • Linear and Abstract Algebra
Replies
2
Views
928
  • Introductory Physics Homework Help
Replies
5
Views
327
  • Programming and Computer Science
Replies
2
Views
1K
  • General Math
Replies
1
Views
887
Back
Top