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!)
A255485 Number of odd terms in expansion of (1 + x + x^2 + x^4)^n. 4
1, 4, 4, 8, 4, 12, 8, 14, 4, 16, 12, 24, 8, 24, 14, 30, 4, 16, 16, 32, 12, 36, 24, 44, 8, 32, 24, 48, 14, 46, 30, 60, 4, 16, 16, 32, 16, 48, 32, 56, 12, 48, 36, 72, 24, 76, 44, 92, 8, 32, 32, 64, 24, 72, 48, 88, 14, 56, 46, 92, 30, 96, 60, 118, 4, 16, 16, 32, 16, 48, 32, 56, 16, 64, 48, 96 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
From Robert Israel, Jan 07 2018: (Start)
a(2*n) = a(n).
a(8*n+1) = 4*a(n). (End)
MAPLE
r1:=proc(f) local g, n; g:=n->nops(expand(f^n) mod 2); [seq(g(n), n=0..90)]; end;
r1(1+x+x^2+x^4);
# Alternative:
P:= 1:
for n from 0 to 100 do
A[n]:= nops(P);
P:= expand(P*(1+x+x^2+x^4)) mod 2;
od:
seq(A[i], i=0..100); # Robert Israel, Jan 07 2018
MATHEMATICA
a[n_] := Count[(List @@ Expand[(1+x+x^2+x^4)^n]) /. x -> 1, _?OddQ]; a[0] = 1;
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Feb 06 2023 *)
PROG
(PARI) a(n) = {my(pol=(1+x+x^2+x^4)*Mod(1, 2)); subst(lift(pol^n), x, 1); } \\ Michel Marcus, Mar 01 2015
CROSSREFS
Sequence in context: A243641 A276620 A276681 * A322328 A095727 A060457
KEYWORD
nonn,look
AUTHOR
N. J. A. Sloane, Feb 28 2015
STATUS
approved

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 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)