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.

A117563 a(n) = A118534(n)/A117078(n) unless A117078(n) = 0 in which case a(n) = 0.

Original entry on oeis.org

0, 0, 1, 0, 3, 1, 5, 3, 1, 9, 1, 3, 13, 3, 1, 1, 19, 5, 9, 23, 1, 15, 11, 9, 3, 33, 11, 35, 21, 3, 3, 5, 45, 3, 49, 5, 1, 3, 23, 1, 59, 9, 63, 27, 65, 11, 1, 3, 75, 45, 1, 79, 21, 35, 1, 1, 89, 5, 39, 93, 21, 9, 3, 103, 3, 3, 25, 3, 115, 69, 1, 39, 19, 1, 75, 29, 3, 3, 3, 21, 139, 3, 143, 61, 87
Offset: 1

Views

Author

Rémi Eismann, Apr 29 2006, Feb 14 2008

Keywords

Comments

a(n) is the "level" of prime(n).
There is a unique decomposition of the primes: provided the level a(n) is > 0, we have prime(n) = weight * level + gap, or A000040(n)=A117078(n)*a(n)+A001223(n).
a(n) = 0 only for primes 2, 3 and 7.
A118534(n) = prime(n) - g(n) or A000040(n) - A001223(n) if prime(n) - g(n) > g(n), 0 otherwise.

Examples

			a(7)=15/3=5; a(14)=39/13=3; a(16)=47/47=1; a(18)=55/11=5; a(29)=105/5=11.
		

Crossrefs

Programs

  • Mathematica
    a34[n_] := If[n == 1 || n == 2 || n == 4, 0, 2 Prime[n] - Prime[n+1]];
    a78[n_] := Block[{a, p = Prime[n], np = Prime[n+1]}, a = Min[Select[ Divisors[2p - np], # > np - p& ]]; If[a == Infinity, 0, a]];
    a[n_] := If[a78[n] == 0, 0, a34[n]/a78[n]];
    Array[a, 85] (* Jean-François Alcover, Nov 02 2018, after Robert G. Wilson v in A118534  *)

Extensions

More terms from Robert G. Wilson v, May 05 2006
Edited by N. J. A. Sloane, May 14 2006