login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A173256 Partial sums of A001481. 1

%I #16 Jun 27 2022 11:17:43

%S 0,1,3,7,12,20,29,39,52,68,85,103,123,148,174,203,235,269,305,342,382,

%T 423,468,517,567,619,672,730,791,855,920,988,1060,1133,1207,1287,1368,

%U 1450,1535,1624,1714,1811,1909,2009,2110,2214,2320,2429,2542,2658,2775

%N Partial sums of A001481.

%C The subsequence of primes in this sequence begins 3, 7, 29, 103, 269, 619, 1811, 3271.

%H Robert Israel, <a href="/A173256/b173256.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = Sum_{i=1..n} A001481(i) = Sum_{i=1..n} (numbers that are the sum of 2 nonnegative squares) = Sum_{i=1..n} (numbers n such that i = x^2 + y^2 has a solution in nonnegative integers x, y).

%e a(66) = 0 + 1 + 2 + 4 + 5 + 8 + 9 + 10 + 13 + 16 + 17 + 18 + 20 + 25 + 26 + 29 + 32 + 34 + 36 + 37 + 40 + 41 + 45 + 49 + 50 + 52 + 53 + 58 + 61 + 64 + 65 + 68 + 72 + 73 + 74 + 80 + 81 + 82 + 85 + 89 + 90 + 97 + 98 + 100 + 101 + 104 + 106 + 109 + 113 + 116 + 117 + 121 + 122 + 125 + 128 + 130 + 136 + 137 + 144 + 145 + 146 + 148 + 149 + 153 + 157 + 160 = 4876.

%p N:= 1000:

%p A001481:= sort(convert({seq(seq(x^2+y^2, y=0..floor(sqrt(N-x^2))),x=0..floor(sqrt(N)))},list)):

%p ListTools:-PartialSums(A001481); # _Robert Israel_, Mar 15 2016

%o (Python)

%o from itertools import count, accumulate, islice

%o from sympy import factorint

%o def A173256_gen(): # generator of terms

%o return accumulate(filter(lambda n:all(p & 3 != 3 or e & 1 == 0 for p, e in factorint(n).items()),count(0)))

%o A173256_list = list(islice(A173256_gen(),30)) # _Chai Wah Wu_, Jun 27 2022

%Y Cf. A001481, A022544, A004018, A000161, A002654, A064533, A000404, A002828, A000378, A025284-A025320, A125110, A091072.

%K nonn

%O 1,3

%A _Jonathan Vos Post_, Feb 14 2010

%E a(21) corrected by _Robert Israel_, Mar 15 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)