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.

Showing 1-10 of 12 results. Next

A047844 Patrick De Geest's "Generations" array read by antidiagonals: a(n,1) = n-th prime, a(1,k+1) = a(2,k), a(n,k+1) = a(n-1,k) + a(n+1,k).

Original entry on oeis.org

2, 3, 3, 5, 7, 7, 7, 10, 13, 13, 11, 16, 23, 30, 30, 13, 20, 30, 43, 56, 56, 17, 28, 44, 67, 97, 127, 127, 19, 32, 52, 82, 125, 181, 237, 237, 23, 40, 68, 112, 179, 276, 403, 530, 530, 29, 48, 80, 132, 214, 339, 520, 757, 994, 994, 31, 54, 94, 162, 274
Offset: 1

Views

Author

Keywords

Examples

			Array begins:
  2,    3,    7,   13,   30,   56,  127,  237,  530, ...
  3,    7,   13,   30,   56,  127,  237,  530,  994, ...
  5,   10,   23,   43,   97,  181,  403,  757, 1662, ...
  7,   16,   30,   67,  125,  276,  520, 1132, 2156, ...
		

Crossrefs

Columns give A000040, A048448-A048455. See also A048456-A048466.

Programs

  • Maple
    A047844:=proc(n,k)global a:if(type(a[n,k],integer))then return a[n,k]:elif(k=1)then a[n,k]:=ithprime(n):elif(n=1)then a[n,k]:=A047844(2,k-1):else a[n,k]:=A047844(n-1,k-1)+A047844(n+1,k-1):fi:return a[n,k]:end:
    for d from 1 to 8 do for m from 1 to d do print(A047844(d-m+1,m)):od:od: # Nathaniel Johnston, Apr 11 2011
  • Mathematica
    a[n_, 1] := a[n, 1] = Prime[n]; a[1, k_] := a[1, k] = a[2, k-1]; a[n_, k_] := a[n, k] = a[n-1, k-1] + a[n+1, k-1]; Table[a[n-k+1, k], {n, 1, 11}, {k, 1, n}] // Flatten (* Jean-François Alcover, Nov 26 2013 *)
  • PARI
    a(n,k)=if(k==1,prime(n),n==1,a(2,k-1),a(n-1,k-1)+a(n+1,k-1))
    for(s=2,9,for(k=1,s-1,print1(a(s-k,k)", "))) \\ Charles R Greathouse IV, Nov 26 2013

Extensions

a(46)-a(60) from Nathaniel Johnston, Apr 11 2011

A048466 Total number of primes in "generation" n.

Original entry on oeis.org

2, 3, 3, 2, 2, 2, 2, 0, 2, 0, 1, 1, 1, 3, 4, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 2, 0, 4, 2, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 2, 1, 1, 2, 0, 0, 0, 2, 1, 1, 0, 2, 0, 0, 0, 4, 1, 2, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 2, 0, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 2, 0
Offset: 2

Views

Author

Patrick De Geest, May 15 1999

Keywords

Crossrefs

For "Generations" see A048448-A048455. See also A047844.

Extensions

Offset corrected and more terms from Sean A. Irvine, Jun 18 2021

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

Original entry on oeis.org

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, 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, 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
Offset: 2

Views

Author

Patrick De Geest, May 15 1999

Keywords

Examples

			a(7)=6 because in generation 7 there are six odd numbers: 127,237,403,729,879,1109.
		

Crossrefs

For "Generations" see A048448-A048455. See also A047844.
Cf. A220466.

Programs

  • Maple
    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
    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
  • Mathematica
    A105321[n_] := Sum[Binomial[1, n-k] Mod[Binomial[k, j], 2], {k, 0, n}, {j, 0, k}];
    a[n_] := A105321[n]/2;
    Table[a[n], {n, 2, 86}] (* Jean-François Alcover, Oct 25 2023 *)
  • Python
    def A048460(n): return (1<>1 # Chai Wah Wu, Jul 30 2025

Formula

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.
a((2*n-3)*2^p) = (2^(p-1)+1)*A001316(n-2), p >= 0 and n >= 2. - Johannes W. Meijer, Jan 22 2013

Extensions

More terms from R. J. Mathar, Aug 07 2010

A048457 Last odd terms from generation 2 onwards.

Original entry on oeis.org

7, 23, 67, 179, 453, 1109, 2653, 6231, 14409, 32877, 74137, 165429, 365691, 801747, 1745331, 3776605, 8130401, 17427659, 37217597, 79224121, 168170537, 356107787, 752453861, 1586875049, 3340696135, 7021048691, 14731810645
Offset: 1

Views

Author

Patrick De Geest, May 15 1999

Keywords

Crossrefs

For "Generations" see A048448-A048455. See also A047844.

A048458 'Prime last odd terms' from generation 2 onwards.

Original entry on oeis.org

7, 23, 67, 179, 1109, 17427659, 1586875049, 7021048691, 1104052140838673681, 80729882077782801781, 49474191359283212247841, 152695677551802424534973144788818335406948326813, 50258816309715893690860594601285860231033059311672877749
Offset: 1

Views

Author

Patrick De Geest, May 15 1999

Keywords

Comments

Intersection of A000040 and A048457.

Crossrefs

For "Generations" see A048448-A048455. Cf. A048459. See also A047844.

Extensions

a(9) - a(13) from Nathaniel Johnston, Apr 11 2011

A048456 First terms from generation 1 onwards.

Original entry on oeis.org

2, 3, 7, 13, 30, 56, 127, 237, 530, 994, 2192, 4144, 9016, 17192, 36949, 71023, 151024, 292340, 616032, 1199556, 2508660, 4909028, 10201810, 20044004, 41437560, 81683022, 168134730, 332321130, 681582636, 1350091410, 2760703019
Offset: 0

Views

Author

Patrick De Geest, May 15 1999

Keywords

Crossrefs

For "Generations" see A048448-A048455. See also A047844.

A048459 Generation indices to 'Prime last odd terms' of sequence A048458.

Original entry on oeis.org

2, 3, 4, 5, 7, 19, 25, 27, 53, 59, 68, 148, 176, 241, 347, 441, 444, 509, 844, 990, 1607, 1823, 2745, 3244, 3517, 3695
Offset: 1

Views

Author

Patrick De Geest, May 15 1999

Keywords

Crossrefs

For "Generations" see A048448-A048455. See also A047844.

Extensions

a(9)-a(21) from Nathaniel Johnston, Apr 11 2011
a(22)-a(26) from Sean A. Irvine, Jun 18 2021

A048461 Numbers in sorted order taken from all generations.

Original entry on oeis.org

2, 3, 5, 7, 10, 11, 13, 16, 17, 19, 20, 23, 28, 29, 30, 31, 32, 37, 40, 41, 43, 44, 47, 48, 52, 53, 54, 56, 59, 61, 66, 67, 68, 71, 72, 73, 79, 80, 82, 83, 88, 89, 94, 96, 97, 101, 103, 106, 107, 109, 112, 113, 114, 125, 126, 127, 131, 132, 137, 139, 140, 146, 149
Offset: 0

Views

Author

Patrick De Geest, May 15 1999

Keywords

Crossrefs

Cf. A048448-A048455. See also A047844.

A048462 Odd numbers in sorted order from generation 2 onwards.

Original entry on oeis.org

3, 7, 13, 23, 43, 67, 97, 125, 127, 179, 181, 237, 339, 403, 453, 729, 757, 879, 1109, 1399, 2199, 2653, 4491, 5335, 6231, 7461, 8933, 12093, 12613, 14409, 14687, 18183, 18917, 23591, 25131, 27933, 29199, 32877, 36233, 36639, 36949, 49193, 50745
Offset: 0

Views

Author

Patrick De Geest, May 15 1999

Keywords

Crossrefs

Cf. A048448-A048455. See also A047844.

A048463 Smallest prime occurring in generation n (0 if none).

Original entry on oeis.org

2, 3, 7, 13, 97, 127, 127, 757, 0, 8933, 0, 18917, 49193, 53831, 71023, 71023, 0, 0, 17427659, 30196487, 0, 0, 0, 0, 1586875049, 988142237, 7021048691, 1397537747, 0, 2760703019, 2760703019, 0, 0, 1033545746063, 0, 0, 7916712387631, 0, 0, 0
Offset: 0

Views

Author

Patrick De Geest, May 15 1999

Keywords

Crossrefs

For "Generations" see A048448-A048455. See also A047844.
Showing 1-10 of 12 results. Next