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.
%I A290077 #32 Aug 06 2023 08:19:16 %S A290077 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, %T A290077 100,18,54,16,12,10,20,12,40,12,36,16,60,24,48,16,120,24,72,16,110,42, %U A290077 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 %N A290077 a(n) = A000010(A005940(1+n)). %C A290077 Each n occurs A014197(n) times in total in this sequence. %H A290077 Antti Karttunen, <a href="/A290077/b290077.txt">Table of n, a(n) for n = 0..16384</a> %H A290077 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %F A290077 a(n) = A000010(A005940(1+n)). %t A290077 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 *) %o A290077 (PARI) %o A290077 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; %o A290077 A290077(n) = eulerphi(A005940(1+n)); %o A290077 (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 %o A290077 (Sage) %o A290077 def A290077(n): %o A290077 i = 1 %o A290077 m = 1 %o A290077 while n > 0: %o A290077 if 0==(n%2): %o A290077 n = n//2 %o A290077 i += 1 %o A290077 else: %o A290077 if(1==(n%4)): %o A290077 n = (n-1)//4 %o A290077 m *= sloane.A000040(i)-1 %o A290077 i += 1 %o A290077 else: %o A290077 n = (n-1)//2 %o A290077 m *= sloane.A000040(i) %o A290077 return m %o A290077 (Scheme) (define (A290077 n) (A000010 (A005940 (+ 1 n)))) %o A290077 (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. %Y A290077 Cf. A000010, A000040, A005940, A014197, A290076, A323915, A324052, A324054, A364568. %K A290077 nonn %O A290077 0,3 %A A290077 _Antti Karttunen_, Jul 19 2017