The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
Search: seq:4,1,3,2,1,4,1
Displaying 1-2 of 2 results found. page 1
     Sort: relevance | references | number | modified | created      Format: long | short | data
A025428 Number of partitions of n into 4 nonzero squares. +30
40
0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 3, 0, 1, 2, 0, 1, 2, 1, 2, 2, 1, 2, 1, 0, 3, 2, 1, 2, 1, 2, 1, 2, 2, 1, 4, 1, 2, 3, 0, 2, 4, 1, 3, 2, 1, 4, 1, 1, 3, 3, 2, 2, 4, 2, 1, 3, 2, 3, 4, 2, 3, 3, 1, 2, 5, 2, 4, 3, 2, 4, 1, 1, 6, 4, 3, 4, 2, 3, 0, 4, 4, 3, 5, 1, 5, 5, 1, 4, 5, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,29
COMMENTS
Records occur at n= 4, 28, 52, 82, 90, 130, 162, 198, 202, 210,.... - R. J. Mathar, Sep 15 2015
LINKS
FORMULA
For n>0, a(n) = ( A063730(n) + 6*A213024(n) + 3*A063725(n/2) + 8*A092573(n) + 6*A010052(n/4) ) / 24. - Max Alekseyev, Sep 30 2012
a(n) = ( A000118(n) - 4*A005875(n) - 6*A004018(n) - 12*A000122(n) - 15*A000007(n) + 12*A014455(n) - 24*A033715(n) - 12*A000122(n/2) + 12*A004018(n/2) + 32*A033716(n) - 32*A000122(n/3) + 48*A000122(n/4) ) / 384. - Max Alekseyev, Sep 30 2012
a(n) = [x^n y^4] Product_{k>=1} 1/(1 - y*x^(k^2)). - Ilya Gutkovskiy, Apr 19 2019
a(n) = Sum_{k=1..floor(n/4)} Sum_{j=k..floor((n-k)/3)} Sum_{i=j..floor((n-j-k)/2)} A010052(i) * A010052(j) * A010052(k) * A010052(n-i-j-k). - Wesley Ivan Hurt, Apr 19 2019
MAPLE
A025428 := proc(n)
local a, i, j, k, lsq ;
a := 0 ;
for i from 1 do
if 4*i^2 > n then
return a;
end if;
for j from i do
if i^2+3*j^2 > n then
break;
end if;
for k from j do
if i^2+j^2+2*k^2 > n then
break;
end if;
lsq := n-i^2-j^2-k^2 ;
if lsq >= k^2 and issqr(lsq) then
a := a+1 ;
end if;
end do:
end do:
end do:
end proc:
seq(A025428(n), n=1..40) ; # R. J. Mathar, Jun 15 2018
# second Maple program:
b:= proc(n, i, t) option remember; `if`(n=0, `if`(t=0, 1, 0),
`if`(i<1 or t<1, 0, b(n, i-1, t)+`if`(i^2>n, 0, b(n-i^2, i, t-1))))
end:
a:= n-> b(n, isqrt(n), 4):
seq(a(n), n=0..100); # Alois P. Heinz, Apr 14 2019
MATHEMATICA
nn = 100; lim = Sqrt[nn]; t = Table[0, {nn}]; Do[n = a^2 + b^2 + c^2 + d^2; If[n <= nn, t[[n]]++], {a, lim}, {b, a, lim}, {c, b, lim}, {d, c, lim}]; t (* T. D. Noe, Sep 28 2012 *)
f[n_] := Length@ IntegerPartitions[n, {4}, Range[ Floor[ Sqrt[n - 1]]]^2]; Array[f, 105] (* Robert G. Wilson v, Sep 28 2012 *)
PROG
(PARI) A025428(n)=sum(a=1, n, sum(b=1, a, sum(c=1, b, sum(d=1, c, a^2+b^2+c^2+d^2==n))))
(PARI) A025428(n)=sum(a=1, sqrtint(max(n-3, 0)), sum(b=1, min(sqrtint(n-a^2-2), a), sum(c=1, min(sqrtint(n-a^2-b^2-1), b), issquare(n-a^2-b^2-c^2, &d) & d <= c )))
(PARI) A025428(n)=sum(a=sqrtint(max(n, 4)\4), sqrtint(max(n-3, 0)), sum(b=sqrtint((n-a^2)\3-1)+1, min(sqrtint(n-a^2-2), a), sum(c=sqrtint((t=n-a^2-b^2)\2-1)+1, min(sqrtint(t-1), b), issquare(t-c^2) ))) \\ - M. F. Hasler, Sep 17 2012
for(n=1, 100, print1(A025428(n), ", "))
(PARI) T(n)={a=matrix(n, 4, i, j, 0); for(d=1, sqrtint(n), forstep(i=n, d*d+1, -1, for(j=2, 4, a[i, j]+=sum(k=1, j, if(k<j&&i-k*d*d>0, a[i-k*d*d, j-k], if(k==j&&i-k*d*d==0, 1))))); a[d*d, 1]=1); for(i=1, n, print(i" "a[i, 4]))} /* Robert Gerbicz, Sep 28 2012 */
CROSSREFS
Cf. A000414, A000534, A025357-A025375, A216374, A025416 (greedy inverse).
Column k=4 of A243148.
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Values of a(0..10^4) double-checked by M. F. Hasler, Sep 17 2012
STATUS
approved
A068227 The "genity" sequence of the primes, i.e., a(n) = g(p) = ((p mod 4) + (p mod 6))/2, where p is the n-th prime. +30
8
2, 3, 3, 2, 4, 1, 3, 2, 4, 3, 2, 1, 3, 2, 4, 3, 4, 1, 2, 4, 1, 2, 4, 3, 1, 3, 2, 4, 1, 3, 2, 4, 3, 2, 3, 2, 1, 2, 4, 3, 4, 1, 4, 1, 3, 2, 2, 2, 4, 1, 3, 4, 1, 4, 3, 4, 3, 2, 1, 3, 2, 3, 2, 4, 1, 3, 2, 1, 4, 1, 3, 4, 2, 1, 2, 4, 3, 1, 3, 1, 4, 1, 4, 1, 2, 4, 3, 1, 3, 2, 4, 4, 2, 4, 2, 4, 3, 3, 2, 1, 2, 3, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The name "genity" was derived from "genes" and "parity", since the fourfold values of g(p) in a sequence corresponding to prime arguments resemble the genetic sequences of the nucleotides in the DNA. Parity is also related, since it originally means a (mod 2) feature, while here we categorize the primes (mod 4) and (mod 6), simultaneously.
The arithmetic function g(p) = ((p mod 4) + (p mod 6))/2 provides integer values for prime arguments, such that 1 <= g(p) <= 4 and is determined by the congruence class of p (mod 12). Specifically, g(p)=1 if p==1 (mod 12), g(p)=2 if p=2 or p==7 (mod 12), g(p)=3 if p=3 or p==5 (mod 12) and g(p)=4 if p==11 (mod 12).
Dickson's conjecture implies that every finite sequence of numbers from 1 to 4 occurs infinitely often in this sequence.
LINKS
The Prime Glossary, Dickson's conjecture
MATHEMATICA
Table[(Mod[Prime[n], 4] + Mod[Prime[n], 6])/2, {n, 1, 100}]
PROG
(PARI) for(i=1, 120, print((prime(i)%4+prime(i)%6)/2))
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Ferenc Adorjan (fadorjan(AT)freemail.hu), Feb 22 2002
EXTENSIONS
Edited by Dean Hickerson and Robert G. Wilson v, Mar 06 2002
STATUS
approved
page 1

Search completed in 0.003 seconds

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 June 14 05:17 EDT 2024. Contains 373393 sequences. (Running on oeis4.)