login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A216391 Number of values of k for which phi(k) is a permutation of decimal digits of k, for k < 2^n. 1
1, 1, 1, 1, 2, 3, 3, 3, 5, 5, 5, 8, 19, 21, 34, 55, 81, 130, 221, 407, 515, 850, 1787, 2287, 3968, 8176, 12332 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,5

COMMENTS

Partial sums of A216394.

LINKS

Table of n, a(n) for n=1..27.

FORMULA

a(n) = # { k in A115921 | k < 2^n }. - M. F. Hasler, Feb 24 2014

EXAMPLE

a(12) = 8 because the values of k satisfying the condition for k < 2^12 are {1, 21, 63, 291, 502, 2518, 2817, 2991}. - V. Raman, Feb 18 2014

MAPLE

A216391 := proc(n)

    local a, k, kdgs, pdgs ;

    a := 0 ;

    for k from 1 to 2^n do

        kdgs := sort(convert(k, base, 10)) ;

        numtheory[phi](k) ;

        pdgs := sort(convert(%, base, 10)) ;

        if pdgs = kdgs then

            a := a+1 ;

        end if;

    end do:

    a ;

end proc:

for n from 1 do

    print(A216391(n)) ;

end do: # R. J. Mathar, Mar 04 2014

PROG

(PARI) a(n)=sum(k=1, 2^n, vecsort(digits(k)) == vecsort(digits(eulerphi(k)))) \\ V. Raman, Feb 18 2014, edited by M. F. Hasler, Mar 04 2014

CROSSREFS

Cf. A115921, A000010.

Sequence in context: A234968 A141784 A234337 * A014202 A309247 A238211

Adjacent sequences:  A216388 A216389 A216390 * A216392 A216393 A216394

KEYWORD

nonn,base,more

AUTHOR

V. Raman, Sep 06 2012

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 28 17:43 EDT 2020. Contains 337393 sequences. (Running on oeis4.)