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-2 of 2 results.

A349660 Numbers which are the sum of a prime and the square of the next prime.

Original entry on oeis.org

11, 28, 54, 128, 180, 302, 378, 548, 864, 990, 1400, 1718, 1890, 2252, 2856, 3534, 3780, 4550, 5108, 5400, 6314, 6968, 8004, 9498, 10298, 10710, 11552, 11988, 12878, 16242, 17288, 18900, 19458, 22340, 22950, 24800, 26726, 28052, 30096, 32214, 32940, 36662
Offset: 1

Views

Author

Karl-Heinz Hofmann, Nov 24 2021

Keywords

Examples

			a(2) = 3 + 5^2 = 28; a(3) = 5 + 7^2 = 54.
		

Crossrefs

Programs

  • Mathematica
    nterms=100;Table[Prime[n]+Prime[n+1]^2,{n,nterms}] (* Paolo Xausa, Nov 24 2021 *)
  • PARI
    a(n) = prime(n) + prime(n+1)^2; \\ Michel Marcus, Nov 24 2021
  • Python
    from sympy import sieve;
    for n in range(1,10001): print(sieve[n] + sieve[n+1]**2)
    

Formula

a(n) = prime(n) + prime(n+1)^2.
a(n) = A000040(n) + A001248(n+1).
a(n) = A036690(n+1) - A001223(n).
a(n) = A001043(n) + A036689(n+1). - Michel Marcus, Nov 24 2021

A352851 a(n) = prime(n)^2 + prime(n+1).

Original entry on oeis.org

7, 14, 32, 60, 134, 186, 308, 384, 558, 872, 998, 1410, 1724, 1896, 2262, 2868, 3542, 3788, 4560, 5114, 5408, 6324, 6978, 8018, 9510, 10304, 10716, 11558, 11994, 12896, 16260, 17298, 18908, 19470, 22352, 22958, 24812, 26736, 28062, 30108, 32222, 32952, 36674, 37446, 39008, 39812, 44744, 49956
Offset: 1

Views

Author

Robert Israel, Apr 05 2022

Keywords

Examples

			a(3) = 5^2 + 7 = 32.
		

Crossrefs

Programs

  • Maple
    seq(ithprime(i)^2+ithprime(i+1), i=1..100);
  • Mathematica
    a[n_] := Prime[n]^2 + Prime[n + 1]; Array[a, 50] (* Amiram Eldar, Apr 07 2022 *)

Formula

a(n) = A001248(n) + A000040(n+1).
a(n) = 2*A140511(n), for n>1. - Michel Marcus, Mar 25 2023
Showing 1-2 of 2 results.