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 19 results. Next

A048448 a(n) = prime(n-1) + prime(n+1) (assuming prime(i) = 0 for i < 1).

Original entry on oeis.org

2, 3, 7, 10, 16, 20, 28, 32, 40, 48, 54, 66, 72, 80, 88, 96, 106, 114, 126, 132, 140, 150, 156, 168, 180, 190, 200, 208, 212, 220, 236, 244, 264, 270, 286, 290, 306, 314, 324, 336, 346, 354, 370, 374, 388, 392, 408, 422, 438, 452, 460, 468, 474, 490, 498, 514
Offset: 0

Views

Author

Patrick De Geest, May 15 1999

Keywords

Comments

Starting from prime sequence add previous and next term yielding generation 2.
a(n) = A116366(n,n-2) for n>2. - Reinhard Zumkeller, Feb 06 2006
Arithmetic derivative (see A003415) of prime(n-1)*prime(n+1) for n > 1. - Giorgio Balzarotti, May 26 2011

Crossrefs

Generation 1 is the 'prime sequence A000040'. See A048449-A048466. See also A047844.

Programs

  • GAP
    Concatenation([2,3], List([2..60], n-> Primes[n-1] + Primes[n+1])); # G. C. Greubel, May 18 2019
  • Magma
    [2,3] cat [NthPrime(n-1) + NthPrime(n+1): n in [2..60]];  // G. C. Greubel, May 18 2019
    
  • Mathematica
    Table[If[n < 2, Prime[n+1], Prime[n+1] + Prime[n-1]], {n, 0, 60}]
    Join[{2,3},First[#]+Last[#]&/@Partition[Prime[Range[60]],3,1]] (* Harvey P. Dale, Jan 25 2016 *)
  • MuPAD
    ithprime(i)+ithprime(i+2) $ i = 1..54 // Zerinvary Lajos, Feb 26 2007
    
  • PARI
    je=[2,3]; for(n=1,60,je=concat(je, prime(n)+prime(n+2))); je \\ modified by G. C. Greubel, May 18 2019
    
  • Sage
    [2,3] + [nth_prime(n-1) + nth_prime(n+1) for n in (2..60)] # G. C. Greubel, May 18 2019
    

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

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.

A048451 Starting from generation 4 add previous and next term yielding generation 5.

Original entry on oeis.org

30, 56, 97, 125, 179, 214, 274, 326, 382, 454, 506, 582, 640, 708, 780, 842, 924, 984, 1060, 1128, 1194, 1276, 1348, 1432, 1508, 1582, 1652, 1718, 1808, 1870, 1998, 2052, 2192, 2238, 2364, 2418, 2522, 2594, 2686, 2758, 2860, 2912, 3028, 3074, 3196, 3268
Offset: 0

Views

Author

Patrick De Geest, May 15 1999

Keywords

Crossrefs

Generation 4 is A048450. See A048448-A048466. See also A047844.

A048452 Starting from generation 5 add previous and next term yielding generation 6.

Original entry on oeis.org

56, 127, 181, 276, 339, 453, 540, 656, 780, 888, 1036, 1146, 1290, 1420, 1550, 1704, 1826, 1984, 2112, 2254, 2404, 2542, 2708, 2856, 3014, 3160, 3300, 3460, 3588, 3806, 3922, 4190, 4290, 4556, 4656, 4886, 5012, 5208, 5352, 5546, 5670, 5888, 5986, 6224
Offset: 0

Views

Author

Patrick De Geest, May 15 1999

Keywords

Crossrefs

Generation 5 is A048451. See A048448-A048466. See also A047844.
Showing 1-10 of 19 results. Next