login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A290077 a(n) = A000010(A005940(1+n)). 9
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

Antti Karttunen, Table of n, a(n) for n = 0..16384

Index entries for sequences related to binary expansion of n

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 }; \\ Modified from code of M. F. Hasler

A290077(n) = eulerphi(A005940(1+n));

(Python/Sage)

def A290077(n):

    i = 1

    m = 1

    while n>0:

      if(0==(n%2)):

        n = n/2

        i = i+1

      else:

        if(1==(n%4)):

          n = (n-1)/4

          m = m*(sloane.A000040(i)-1)

          i = i+1

        else:

          n = (n-1)/2

          m = 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

Cf. A000010, A000040, A005940, A014197, A290076.

Sequence in context: A086296 A096504 A277906 * A277030 A011773 A306275

Adjacent sequences:  A290074 A290075 A290076 * A290078 A290079 A290080

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 16 10:36 EDT 2019. Contains 327094 sequences. (Running on oeis4.)