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

%I #13 Oct 20 2017 18:51:06

%S 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,

%T 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,

%U 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

%N a(n) = phi(n-p) where p is largest prime < n, a(1) = a(2) = 1 by convention.

%C 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

%H Antti Karttunen, <a href="/A078772/b078772.txt">Table of n, a(n) for n = 1..16384</a>

%F For n >= 3, a(n) = A000010(A049711(n)). - _Antti Karttunen_, Oct 20 2017

%e a(10) = phi(10-7) = phi(3) = 2.

%o (PARI) for (n=1,100, print1(eulerphi(n-precprime(n-1))","))

%o (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

%Y Cf. A000010, A001223, A049711.

%K nonn

%O 1,10

%A _Jon Perry_, Jan 09 2003

%E Description clarified by _Antti Karttunen_, Oct 20 2017

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 July 23 17:14 EDT 2024. Contains 374552 sequences. (Running on oeis4.)