cp's OEIS Frontend

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.

Showing 1-10 of 13 results. Next

A216381 Phi(n) values in A115921.

Original entry on oeis.org

1, 12, 36, 192, 250, 1258, 1872, 1992, 3544, 2952, 3576, 3756, 2016, 1764, 4356, 2268, 2376, 2472, 2280, 5184, 2988, 11736, 11832, 12168, 13200, 10258, 20176, 10528, 21472, 15228, 12596, 12958, 12576, 19872, 16384, 33568, 12348, 35440, 14256, 44512
Offset: 1

Views

Author

V. Raman, Sep 06 2012

Keywords

Crossrefs

A115920 Numbers k such that the digits of sigma(k) are a permutation of those of k, in base 10.

Original entry on oeis.org

1, 69, 258, 270, 276, 609, 639, 2391, 2556, 2931, 3409, 3678, 3679, 4291, 5092, 6937, 8251, 10231, 12087, 12931, 15480, 16387, 20850, 22644, 22893, 24369, 26145, 26442, 27846, 28764, 29880, 29958, 30823, 31812, 32658, 34207, 34758
Offset: 1

Views

Author

Giovanni Resta, Feb 06 2006

Keywords

Comments

There is some m > 1 such that a(n) > m*n for all n > 1. This follows from the positive density of numbers k such that sigma(k)/k > 10. - Charles R Greathouse IV, Sep 07 2012

Examples

			sigma(10231) = 11032, sigma(31812) = 81312.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[35000],Sort[IntegerDigits[#]]==Sort[ IntegerDigits[ DivisorSigma[ 1,#]]]&] (* Harvey P. Dale, May 09 2013 *)
  • PARI
    isok(n) = vecsort(digits(n)) == vecsort(digits(sigma(n))); \\ Michel Marcus, Dec 13 2015 and May 27 2018
  • Python
    from sympy import divisor_sigma
    A115920_list = [n for n in range(1,10**4) if sorted(str(divisor_sigma(n))) == sorted(str(n))] # Chai Wah Wu, Dec 13 2015
    

A114065 Numbers k such that the digits of phi(k) and sigma(k) are permutations of those of k.

Original entry on oeis.org

1, 3014685, 21638943, 170726121, 207380169, 215341083, 233559801, 234511083, 321634251, 1620475083, 1982243007, 2019804093, 2084013063, 2185499607, 2410658685, 2653713819, 2741018409, 2859457041, 3018792645, 3075268041, 3148920504, 3701484126, 4071408255
Offset: 1

Views

Author

Giovanni Resta, Feb 13 2006

Keywords

Comments

Intersection of A115920 and A115921.

Examples

			sigma(3014685) = 5431680 and phi(3014685) = 1586304.
		

Crossrefs

Programs

  • PARI
    isok(n) = (d = vecsort(digits(n))) && (ds = vecsort(digits(sigma(n)))) && (d == ds) && (de = vecsort(digits(eulerphi(n)))) && (ds == de); \\ Michel Marcus, Dec 13 2015
  • Python
    from sympy import totient, divisor_sigma
    A114065_list = [n for n in range(1,10**7) if sorted(str(divisor_sigma(n))) == sorted(str(totient(n))) == sorted(str(n))] # Chai Wah Wu, Dec 13 2015
    

A175795 Numbers n such that the digits of sigma(n) are exactly the same (albeit in different order) as the digits of phi(n), in base 10.

Original entry on oeis.org

1, 65, 207, 1769, 2066, 2771, 3197, 4330, 4587, 4769, 4946, 5067, 6443, 6623, 6989, 7133, 8201, 9263, 11951, 12331, 13243, 16403, 17429, 17441, 21416, 22083, 23161, 24746, 27058, 27945, 28049, 28185, 28451, 29111, 30551, 31439, 32554, 32566, 32849, 33715
Offset: 1

Views

Author

Michel Lagneau, Sep 06 2010

Keywords

Examples

			2771 is in the sequence because sigma(2771) = 2952, phi(2771) = 2592
		

Crossrefs

Cf. A000010 (Euler totient function), A000203 (sigma function), A115920, A115921, A114065.

Programs

  • Mathematica
    okQ[n_] := Module[{idn = IntegerDigits[DivisorSigma[1,n]]}, Sort[idn] == Sort[IntegerDigits[EulerPhi[n]]]]; Select[Range[40000], okQ]
  • PARI
    isok(n) = (de = digits(eulerphi(n))) && (ds = digits(sigma(n))) && (vecsort(de) == vecsort(ds)); \\ Michel Marcus, Dec 13 2015
  • Python
    from sympy import totient, divisor_sigma
    A175795_list = [n for n in range(1,10**4) if sorted(str(divisor_sigma(n))) == sorted(str(totient(n)))] # Chai Wah Wu, Dec 13 2015
    

A082060 Numbers n such that n and phi(n) have the same distinct decimal digits.

Original entry on oeis.org

1, 21, 63, 101, 233, 291, 502, 677, 1021, 1031, 1051, 1061, 1091, 1201, 1226, 1301, 1601, 1801, 1901, 2011, 2201, 2333, 2383, 2393, 2518, 2633, 2677, 2700, 2767, 2817, 2833, 2991, 3011, 3023, 3122, 3203, 3253, 3323, 3623, 3677, 3767, 3823, 3923, 3989
Offset: 1

Views

Author

Labos Elemer, Apr 04 2003

Keywords

Comments

Contains A113781 as a subsequence. - M. F. Hasler, Nov 28 2007
Numbers n such that n and phi(n) have the same decimal digits = A115921. - Jaroslav Krizek, Nov 13 2014

Examples

			n=502 is a member since phi[502]=250
		

Crossrefs

Programs

  • Mathematica
    Select[Range[4000],Union[IntegerDigits[#]]==Union[IntegerDigits[ EulerPhi[ #]]]&] (* Harvey P. Dale, Jan 31 2022 *)
  • PARI
    for(n=1,10^4,if(Set(Vec(Str(n)))==Set(Vec(Str(eulerphi(n)))),print1(n", "))) \\ M. F. Hasler, Nov 28 2007
    
  • Python
    from sympy import totient
    A082060_list = [n for n in range(1,10**4) if set(str(totient(n))) == set(str(n))] # Chai Wah Wu, Dec 13 2015

Extensions

Definition and comment corrected by Jaroslav Krizek, Nov 13 2014

A113781 Numbers k such that the representation of phi(k) is a cyclic permutation of that of k, in base 10.

Original entry on oeis.org

1, 21, 63, 502, 4435, 5229, 5637, 6822, 8022, 35683, 98802, 176481, 210526, 421052, 442881, 480249, 529443, 544435, 640170, 842104, 920262, 976482, 7390422, 21251221, 28934019, 36174255, 36563587, 51804709, 59963997, 60550457
Offset: 1

Views

Author

Giovanni Resta, Jan 26 2006

Keywords

Comments

This is a subsequence of A115921, which in turn is a subsequence of A082060. - M. F. Hasler, Nov 28 2007

Examples

			phi(442881) = 288144.
		

Crossrefs

Programs

  • Mathematica
    lst = {}; Do[s = ToString@n; d = ToString@EulerPhi@n; If[StringLength@d == StringLength@n && {}!= StringPosition[s<>s, d], AppendTo[lst, n]], {n, 10^6}]; lst
    lst = {}; Do[s = ToString(AT)n; d = ToString(AT)EulerPhi(AT)n; If[StringLength(AT)d == StringLength(AT)n && {}!= StringPosition[s<>s, d], AppendTo[lst, n]], {n, 10^6}]; lst (* M. F. Hasler, Nov 28 2007 *)

Extensions

a(24)-a(30) from Donovan Johnson, Aug 27 2010

A216394 Number of values of k for which phi(k) is a permutation of decimal digits of k, for 2^(n-1) < k < 2^n.

Original entry on oeis.org

1, 0, 0, 0, 1, 1, 0, 0, 2, 0, 0, 3, 11, 2, 13, 21, 26, 49, 91, 186, 108, 335, 937, 500, 1681, 4208, 4156
Offset: 1

Views

Author

V. Raman, Sep 06 2012

Keywords

Examples

			a(14) = 2 because the values of k satisfying the condition for 2^13 < k < 2^14 are {8541, 8982}. - _V. Raman_, Feb 18 2014
		

Crossrefs

Programs

  • PARI
    a(n)=sum(k=2^(n-1), 2^n, vecsort(digits(k)) == vecsort(digits(eulerphi(k)))) \\ V. Raman, Feb 18 2014, based on edits by M. F. Hasler
    
  • Python
    from sympy import totient
    def A216394(n):
        if n == 1:
            return 1
        c = 0
        for i in range(2**(n-1)+1, 2**n):
            s1, s2 = sorted(str(i)), sorted(str(totient(i)))
            if len(s1) == len(s2) and s1 == s2:
                c += 1
        return c # Chai Wah Wu, Jul 23 2015

Formula

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

A216391 Number of values of k for which phi(k) is a permutation of decimal digits of k, for k < 2^n.

Original entry on oeis.org

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, 18560, 36832, 71375, 94015, 173754
Offset: 1

Views

Author

V. Raman, Sep 06 2012

Keywords

Comments

Partial sums of A216394.

Examples

			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
		

Crossrefs

Programs

  • 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
  • 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

Formula

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

Extensions

a(28)-a(32) from Amiram Eldar, Nov 09 2024

A258786 Numbers n whose sum of anti-divisors is a permutation of their digits.

Original entry on oeis.org

5, 8, 41, 56, 64, 358, 614, 946, 1092, 1382, 1683, 2430, 2683, 2734, 2834, 2945, 3045, 3067, 3602, 4056, 4286, 5186, 5784, 6874, 7251, 8104, 8546, 9264, 12881, 14028, 14384, 15258, 17386, 21103, 22044, 23331, 24434, 24603, 25346, 26420, 26822, 26845, 27024, 27232
Offset: 1

Views

Author

Paolo P. Lava, Jun 10 2015

Keywords

Comments

A073930 is a subset of this sequence.

Examples

			Anti-divisors of 5 are 2, 3 whose sum is 5.
Anti-divisors of 41 are 2, 3, 9, 27 whose sum is 41.
Anti-divisors of 64 are 3, 43 whose sum is 46 that is a permutation of the digit of 64.
		

Crossrefs

Programs

  • Maple
    with(numtheory):P:=proc(q) local a,b,j,k,ok,n,p;
    for n from 1 to q do k:=0; j:=n;
    while j mod 2 <> 1 do k:=k+1; j:=j/2; od;
    a:=sigma(2*n+1)+sigma(2*n-1)+sigma(n/2^k)*2^(k+1)-6*n-2;
    if ilog10(n)=ilog10(a) then j:=sort(convert(n,base,10)); a:=sort(convert(a,base,10)); ok:=1;
    for k from 1 to nops(a) do if j[k]<>a[k] then ok:=0; break;
    fi; od; if ok=1 then print(n); fi; fi; od; end: P(10^9);
  • Mathematica
    ad[n_] := Cases[Range[2, n - 1], ?(Abs[Mod[n, #] - #/2] < 1 &)]; Select[Range@ 5000, SameQ[DigitCount@ #, DigitCount[Total[ad@ #]]] &] (* _Michael De Vlieger, Jun 10 2015 *)
  • Python
    from sympy.ntheory.factor_ import antidivisors
    A258786_list = [n for n in range(1,10**5) if sorted(str(n)) == sorted(str(sum(antidivisors(n))))] # Chai Wah Wu, Jun 11 2015

A273799 Numbers n such that the decimal digits of n-phi(n) are a permutation of those of n.

Original entry on oeis.org

91, 342, 351, 627, 684, 874, 950, 1824, 2114, 2318, 2715, 3051, 3171, 3172, 3402, 3411, 4228, 6344, 6804, 7346, 8414, 8456, 8474, 9093, 9125, 9191, 9254, 9500, 9531, 9548, 9672, 9824, 9950, 15804, 18010, 18312, 18508, 18930, 19190, 21028, 22126, 23218, 24180, 24716
Offset: 1

Views

Author

Paolo P. Lava, May 31 2016

Keywords

Examples

			91 - phi(91) = 91 - 72 = 19;
342 - phi(342) = 342 - 108 = 234.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local a,b,c,d,k,n; for n from 1 to q do a:=n; b:=n-phi(n);
    if ilog10(a)=ilog10(b) then c:=[]; d:=[]; for k from 1 to ilog10(n)+1 do
    c:=[op(c),(a mod 10)]; a:=trunc(a/10); d:=[op(d),(b mod 10)]; b:=trunc(b/10); od;
    c:=sort(c); d:=sort(d); if c=d then print(n); fi; fi; od; end: P(10^25);
  • Mathematica
    Select[Range[25000], Sort@ IntegerDigits@ # == Sort@ IntegerDigits[# - EulerPhi@ #] &] (* Michael De Vlieger, Jun 01 2016 *)
Showing 1-10 of 13 results. Next