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 27 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

A048455 Starting from generation 8 add previous and next term yielding generation 9.

Original entry on oeis.org

530, 994, 1662, 2156, 2970, 3598, 4491, 5335, 6231, 7278, 8178, 9308, 10290, 11382, 12502, 13530, 14738, 15768, 16960, 18082, 19228, 20462, 21608, 22870, 24050, 25238, 26522, 27600, 29148, 30120, 32004, 32880, 34930, 35772, 37724, 38646
Offset: 0

Views

Author

Patrick De Geest, May 15 1999

Keywords

Crossrefs

Generation 8 is A048454. See A048448-A048466. See also A047844.

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

A116366 Triangle read by rows: even numbers as sums of two odd primes.

Original entry on oeis.org

6, 8, 10, 10, 12, 14, 14, 16, 18, 22, 16, 18, 20, 24, 26, 20, 22, 24, 28, 30, 34, 22, 24, 26, 30, 32, 36, 38, 26, 28, 30, 34, 36, 40, 42, 46, 32, 34, 36, 40, 42, 46, 48, 52, 58, 34, 36, 38, 42, 44, 48, 50, 54, 60, 62, 40, 42, 44, 48, 50, 54, 56, 60, 66, 68, 74, 44, 46, 48, 52, 54, 58, 60, 64, 70, 72, 78, 82
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 06 2006

Keywords

Comments

T(n,k) = 2*A065305(n,k) = A065342(n+1,k+1);
Row sums give A116367; central terms give A116368;
T(n,1) = A113935(n+1);
T(n,n-2) = A048448(n) for n>2;
T(n,n-1) = A001043(n) for n>1;
T(n,n) = A001747(n+2) = A100484(n+1).

Examples

			Triangle begins:
  6;
  8,  10;
  10, 12, 14;
  14, 16, 18, 22;
  16, 18, 20, 24, 26;
  20, 22, 24, 28, 30, 34;
  22, 24, 26, 30, 32, 36, 38;
  26, 28, 30, 34, 36, 40, 42, 46;
  32, 34, 36, 40, 42, 46, 48, 52, 58;
  34, 36, 38, 42, 44, 48, 50, 54, 60, 62;
  40, 42, 44, 48, 50, 54, 56, 60, 66, 68, 74;
  44, 46, 48, 52, 54, 58, 60, 64, 70, 72, 78, 82; etc. - _Bruno Berselli_, Aug 16 2013
		

Crossrefs

Programs

  • Magma
    [NthPrime(n+1)+NthPrime(k+1): k in [1..n], n in [1..15]]; // Bruno Berselli, Aug 16 2013
    
  • Mathematica
    Table[Prime[n+1] + Prime[k+1], {n,1,12}, {k,1,n}]//Flatten (* G. C. Greubel, May 12 2019 *)
  • PARI
    {T(n,k) = prime(n+1) + prime(k+1)}; \\ G. C. Greubel, May 12 2019
    
  • Sage
    [[nth_prime(n+1) + nth_prime(k+1) for k in (1..n)] for n in (1..12)] # G. C. Greubel, May 12 2019

Formula

T(n,k) = prime(n+1) + prime(k+1), 1 <= k <= n.

A336381 Primes p(n) such that gcd(n, prime(n-1)+prime(n+1)) > 1.

Original entry on oeis.org

7, 11, 13, 19, 23, 29, 31, 37, 43, 47, 53, 61, 71, 73, 79, 89, 97, 101, 107, 113, 131, 137, 139, 149, 151, 163, 167, 173, 181, 193, 199, 223, 229, 233, 239, 251, 263, 269, 271, 281, 293, 311, 317, 337, 349, 359, 373, 379, 383, 397, 409, 421, 433, 443, 449
Offset: 1

Views

Author

Clark Kimberling, Oct 25 2020

Keywords

Examples

			In the following table, P(n) = A000040(n) = prime(n).
  n    P(n)   P(n-1)+P(n+1)   gcd
  2     3          7           1
  3     5         10           1
  4     7         16           4
  5    11         20           5
  6    13         28           2
2 and 3 are in A336378; 4 and 5 are in A336379; 3 and 5 are in A336380; 7 and 11 are in A336381.
		

Crossrefs

Programs

  • Maple
    q:= 2: r:= 3:
    R:= NULL: count:= 0:
    for n from 2 while count < 100 do
      p:= q; q:= r; r:= nextprime(r);
      if igcd(n,p+r) > 1 then count:= count+1; R:= R, q; fi
    od:
    R; # Robert Israel, Dec 08 2020
  • Mathematica
    p[n_] := Prime[n];
    u = Select[Range[2, 200], GCD[#, p[# - 1] + p[# + 1]] == 1 &]  (* A336378 *)
    v = Select[Range[2, 200], GCD[#, p[# - 1] + p[# + 1]] > 1 &]   (* A336379 *)
    Prime[u]  (* A336380 *)
    Prime[v]  (* A336381 *)
    Select[Partition[Prime[Range[100]],3,1],GCD[PrimePi[#[[2]]],#[[1]]+#[[3]]]>1&][[All,2]] (* Harvey P. Dale, Dec 07 2022 *)
  • PARI
    for(n=2,200,if(gcd(n,prime(n-1)+prime(n+1))>1,print1(prime(n),", "))) \\ Derek Orr, Nov 23 2020

Extensions

Offset changed by Robert Israel, Dec 08 2020

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

A048449 Starting from generation 2 add previous and next term yielding generation 3.

Original entry on oeis.org

7, 13, 23, 30, 44, 52, 68, 80, 94, 114, 126, 146, 160, 176, 194, 210, 232, 246, 266, 282, 296, 318, 336, 358, 380, 398, 412, 428, 448, 464, 500, 514, 550, 560, 592, 604, 630, 650, 670, 690, 716, 728, 758, 766, 796, 814, 846, 874, 898, 920, 934, 958, 972, 1004
Offset: 0

Views

Author

Patrick De Geest, May 15 1999

Keywords

Crossrefs

Generation 2 is A048448. See A048448-A048466. See also A047844.

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

A048450 Starting from generation 3 add previous and next term yielding generation 4.

Original entry on oeis.org

13, 30, 43, 67, 82, 112, 132, 162, 194, 220, 260, 286, 322, 354, 386, 426, 456, 498, 528, 562, 600, 632, 676, 716, 756, 792, 826, 860, 892, 948, 978, 1050, 1074, 1142, 1164, 1222, 1254, 1300, 1340, 1386, 1418, 1474, 1494, 1554, 1580, 1642, 1688, 1744
Offset: 0

Views

Author

Patrick De Geest, May 15 1999

Keywords

Crossrefs

Generation 3 is A048449. See A048448-A048466. See also A047844.
Showing 1-10 of 27 results. Next