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.

A083242 For n >= 3, a(n-3) + a(n-2) + a(n-1) + a(n) = prime(n); a(0) = 0, a(1) = 1, a(2) = 1.

Original entry on oeis.org

0, 1, 1, 3, 2, 5, 3, 7, 4, 9, 9, 9, 10, 13, 11, 13, 16, 19, 13, 19, 20, 21, 19, 23, 26, 29, 23, 25, 30, 31, 27, 39, 34, 37, 29, 49, 36, 43, 35, 53, 42, 49, 37, 63, 44, 53, 39, 75, 56, 57, 41, 79, 62, 59, 51, 85, 68, 65, 53, 91, 72, 67, 63, 105, 76, 69, 67, 119
Offset: 0

Views

Author

Labos Elemer, Apr 24 2003

Keywords

Examples

			a(43) + a(44) + a(45) + a(46) = 63 + 44 + 53 + 39 = 199 = p[46]
		

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember; ithprime(n) - procname(n-1) - procname(n-2)-procname(n-3) end proc:
    f(0):= 0: f(1):= 1: f(2):= 1:
    map(f, [$0..100]); # Robert Israel, Aug 20 2024
  • Mathematica
    f[x_] := Prime[x]-f[x-1]-f[x-2]-f[x-3] {f[0]=0, f[1]=1, f[2]=1}; Table[f[w], {w, 0, 20}]

Formula

From Robert Israel, Aug 20 2024: (Start)
a(4*k) = Sum_{j=1..k} A001223(4*j-1).
a(4*k + 1) = 1 + Sum_{j=1..k} A001223(4*j).
a(4*k + 2) = Sum_{j=0..k} A001223(4*j+1).
a(4*k + 3) = 1 + Sum_{j=0..k} A001223(4*j+2). (End)

A109315 Numbers n such that prime(n) - n is a prime power.

Original entry on oeis.org

12, 15, 38, 39, 118, 152, 190, 258, 462, 690, 746, 1396, 1632, 2119, 3370, 4522, 4600, 7520, 15006, 24222, 33156, 34038, 51372, 52342, 64638, 77470, 90790, 101946, 104670, 156772, 166822, 167700, 175818, 194092, 200022, 229630, 246208, 328462, 362440, 372882
Offset: 1

Views

Author

Zak Seidov and Robert G. Wilson v, May 22 2005

Keywords

Examples

			690 is OK because prime(690)-690 = 5179-690 = 4489 = 67^2, 67 is prime.
		

Crossrefs

Cf. A025475 = powers of a prime but not prime, also nonprime n such that sigma(n)*phi(n)>(n-1)2; A107712 = values of q, A107713 = values of k; A107714 = values of prime(A109315(n)).
Cf. A083240.

Programs

  • Mathematica
    lst = {}; fQ[n_] := Block[{pf=FactorInteger[n]}, (2-Length[pf])(pf[[1, 2]]-1) > 0]; Do[ If[ fQ[Prime[n] - n], Print[n]; AppendTo[lst, n]], {n, 3, 362439}]; lst

Formula

prime(n) - n = q^k, q is prime and k_Integer >= 2.
Showing 1-2 of 2 results.