The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
For n >= 3, a(n) = A000010(A049711(n)). - Antti Karttunen, Oct 20 2017
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
Sequence in context: A321856 A175078 A121561 * A088018 A204909 A214211
KEYWORD
nonn
AUTHOR
Jon Perry, Jan 09 2003
EXTENSIONS
Description clarified by Antti Karttunen, Oct 20 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 13 05:55 EDT 2024. Contains 372498 sequences. (Running on oeis4.)