cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A048460 Total of odd numbers in the generations from 2 onwards.

This page as a plain text file.
%I A048460 #28 Jul 31 2025 16:56:12
%S A048460 2,3,3,3,4,6,5,3,4,6,6,6,8,12,9,3,4,6,6,6,8,12,10,6,8,12,12,12,16,24,
%T A048460 17,3,4,6,6,6,8,12,10,6,8,12,12,12,16,24,18,6,8,12,12,12,16,24,20,12,
%U A048460 16,24,24,24,32,48,33,3,4,6,6,6,8,12,10,6,8,12,12,12,16,24,18,6,8,12,12,12,16
%N A048460 Total of odd numbers in the generations from 2 onwards.
%F A048460 It appears that a(n) = A105321(n)/2. - _Omar E. Pol_, May 29 2010. Proof from _Nathaniel Johnston_, Nov 07 2010: If you remove every 2nd row from Pascal's triangle then the rule for constructing the parity of the next row from the current row is the same as the rule for constructing generation n+1 of the primes from generation n: add up the previous and next term in the current row.
%F A048460 a((2*n-3)*2^p) = (2^(p-1)+1)*A001316(n-2), p >= 0 and n >= 2. - _Johannes W. Meijer_, Jan 22 2013
%e A048460 a(7)=6 because in generation 7 there are six odd numbers: 127,237,403,729,879,1109.
%p A048460 A048460 := proc(nmax) local par, c, r, prevc, prevl, cpar; par := [[],[1,1]] ; for c from 3 to nmax do prevc := op(-1,par) ; prevl := nops(prevc) ; if nops(prevc) < 2 then cpar := [0] ; else cpar := [op(2,prevc)] ; end if; for r from 2 to prevl-1 do cpar := [op(cpar),( op(r-1,prevc) + op(r+1,prevc)) mod 2] ; end do: cpar := [op(cpar), op(prevl-1,prevc),1] ; par := [op(par),cpar] ; end do: cpar := [] ; for c from 2 to nops(par) do add(r,r=op(c,par)) ; cpar := [op(cpar),%] ; end do: cpar ; end proc: A048460(120) ; # _R. J. Mathar_, Aug 07 2010
%p A048460 nmax := 86: A001316 := n -> if n <=- 1 then 0 else 2^add(i, i=convert(n, base, 2)) fi: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 2 to nmax/(p+2) do a((2*n-3)*2^p) := (2^(p-1)+1)*A001316(n-2) od: od: seq(a(n), n=2..nmax); # _Johannes W. Meijer_, Jan 22 2013
%t A048460 A105321[n_] := Sum[Binomial[1, n-k] Mod[Binomial[k, j], 2], {k, 0, n}, {j, 0, k}];
%t A048460 a[n_] := A105321[n]/2;
%t A048460 Table[a[n], {n, 2, 86}] (* _Jean-François Alcover_, Oct 25 2023 *)
%o A048460 (Python)
%o A048460 def A048460(n): return (1<<n.bit_count())+(1<<(n-1).bit_count())>>1 # _Chai Wah Wu_, Jul 30 2025
%Y A048460 For "Generations" see A048448-A048455. See also A047844.
%Y A048460 Cf. A220466.
%K A048460 nonn
%O A048460 2,1
%A A048460 _Patrick De Geest_, May 15 1999
%E A048460 More terms from _R. J. Mathar_, Aug 07 2010