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!)
A290077 a(n) = A000010(A005940(1+n)). 10
1, 1, 2, 2, 4, 2, 6, 4, 6, 4, 8, 4, 20, 6, 18, 8, 10, 6, 12, 8, 24, 8, 24, 8, 42, 20, 40, 12, 100, 18, 54, 16, 12, 10, 20, 12, 40, 12, 36, 16, 60, 24, 48, 16, 120, 24, 72, 16, 110, 42, 84, 40, 168, 40, 120, 24, 294, 100, 200, 36, 500, 54, 162, 32, 16, 12, 24, 20, 48, 20, 60, 24, 72, 40, 80, 24, 200, 36, 108, 32, 120, 60, 120 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Each n occurs A014197(n) times in total in this sequence.
LINKS
FORMULA
a(n) = A000010(A005940(1+n)).
MATHEMATICA
f[n_, i_, x_]:=f[n, i, x]=Which[n==0, x, EvenQ[n], f[n/2, i + 1, x], f[(n - 1)/2, i, x Prime[i]]]; a005940[n_]:=f[n - 1, 1, 1]; Table[EulerPhi[a005940[n + 1]], {n, 0, 100}] (* Indranil Ghosh, Jul 20 2017 *)
PROG
(PARI)
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
A290077(n) = eulerphi(A005940(1+n));
(PARI) A290077(n) = { my(p=2, z=1); while(n, if(!(n%2), p=nextprime(1+p), z *= (p-(1==(n%4)))); n>>=1); (z); }; \\ Antti Karttunen, Aug 05 2023
(Sage)
def A290077(n):
i = 1
m = 1
while n > 0:
if 0==(n%2):
n = n//2
i += 1
else:
if(1==(n%4)):
n = (n-1)//4
m *= sloane.A000040(i)-1
i += 1
else:
n = (n-1)//2
m *= sloane.A000040(i)
return m
(Scheme) (define (A290077 n) (A000010 (A005940 (+ 1 n))))
(Scheme) (define (A290077 n) (let loop ((n n) (m 1) (i 1)) (cond ((zero? n) m) ((even? n) (loop (/ n 2) m (+ 1 i))) ((= 1 (modulo n 4)) (loop (/ (- n 1) 4) (* m (- (A000040 i) 1)) (+ 1 i))) (else (loop (/ (- n 1) 2) (* m (A000040 i)) i))))) ;; Requires only an implementation of A000040, see for example under A083221.
CROSSREFS
Sequence in context: A086296 A096504 A277906 * A277030 A011773 A306275
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 19 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 March 28 15:38 EDT 2024. Contains 371254 sequences. (Running on oeis4.)