|
|
A078772
|
|
a(n) = phi(n-p) where p is largest prime < n, a(1) = a(2) = 1 by convention.
|
|
1
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 4, 2, 1, 1, 1, 1, 2, 2, 4, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 4, 2, 1, 1, 2, 2, 4, 2, 1, 1, 1, 1, 2, 2, 4, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 4, 2, 1, 1, 2, 2, 1, 1, 2, 2, 4, 2, 1, 1, 2, 2, 4, 2, 6, 4, 1, 1, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,10
|
|
COMMENTS
|
This sequence is a block of concatenations of vectors of lengths of prime gaps with elements phi(i) for i = 1 to that prime gap. Those vectors are (1), (1, 1), (1, 1, 2, 2), (1, 1, 2, 2, 4, 2), ... - David A. Corneth, Oct 20 2017
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(10) = phi(10-7) = phi(3) = 2.
|
|
PROG
|
(PARI) for (n=1, 100, print1(eulerphi(n-precprime(n-1))", "))
(PARI) first(n) = {n = nextprime(n); my(res = vector(n), phimap = Map(), q = 2, v); res[1] = res[2] = 1; forprime(p=3, n, if(!mapisdefined(phimap, p - q), mapput(phimap, p - q, vector(p - q, i, eulerphi(i)))); v = mapget(phimap, p-q); for(i = q + 1, p, res[i] = v[i - q]); q = p); res} \\ David A. Corneth, Oct 20 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|