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.

Previous Showing 11-17 of 17 results.

A114260 Numbers k such that the 4th power of k contains exactly 4 copies of each digit of k.

Original entry on oeis.org

5702631489, 7264103985, 7602314895, 7824061395, 8105793624, 8174035962, 8304269175, 8904623175, 8923670541, 9451360827, 9785261403, 9804753612, 9846032571, 57026314890, 59730829461, 60947591328, 64017823995, 65190218436, 67024081935, 70645192839, 72641039850, 74991208356
Offset: 1

Views

Author

Giovanni Resta, Nov 18 2005

Keywords

Comments

First 13 terms of the sequence are also pandigital, i.e., they contain all the 10 digits at least once. This is probably accidental, but quite curious.
If a(n) is in the sequence, then 10*a(n) is also in the sequence. So 10^k*a(n) is also in the sequence for positive integers k. Thus this sequence differs from A365144. - Ray Chandler, Aug 23 2023
From David A. Corneth, Aug 30 2023: (Start)
Not all terms are pandigital, for example 65190218436, 75932056341 and 83581076421 are not.
For any k ends in, say, 425742 (which has six digits) the last six digits of k^4 are fixed. So if k ends in 425742 then k^4 ends in 425742^2 mod 10^6 = 318096 and so it must have a 3, 1, 8, 0, 9 and 6 none of which are contained in 425742.
Therefore if k ends in 425742 then it must have at least 12 digits. In a search for terms <= 10^11 this eases the search, in a search for terms <= 10^12 this leaves only 6! * 5 / 6 = 600 cases to check instead of 10^6.
An additional idea one might use is that the number of digits of k^4 must be a multiple of 4. I.e. 10^(4*m + 3) <= k^4 <= 10^(4*m + 4) so 10^m * 10^0.75 < m < 10^(m + 1) (all strict inequalities as 10^0.75 (cf. A210522) is irrational) which tells us a bunch about the leading digits of k.
Checking pandigital numbers separately might ease the search. That way if the union of some k and last q digits of k^4 is all decimal digits one could end the search there. This goes for example for 100426. If a term ends in 100426 then it has all decimal digits. (End)
All terms are divisible by 9. First decimal digit of a term is 5 or larger. - Chai Wah Wu, Feb 27 2024

Examples

			5702631489 is a term since its 4th power 1057550783692741389295697108242363408641 contains four 5's, four 7's, four 0's and so on.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import integer_nthroot
    def A114260_gen(): # generator of terms
        for l in count(1):
            a = integer_nthroot(10**(4*l-1),4)[0]
            if (a9:=a%9):
                a += 9-a9
            for b in range(a,10**l,9):
                if sorted(str(b)*4)==sorted(str(b**4)):
                    yield b
    A114260_list = list(islice(A114260_gen(), 5)) # Chai Wah Wu, Feb 27 2024

Extensions

a(14) from Ray Chandler, Aug 24 2023
More terms from David A. Corneth, Aug 30 2023

A114259 Numbers k such that k^3 contains exactly 3 copies of each digit of k.

Original entry on oeis.org

87624375, 88236519, 516473892, 569784132, 576283194, 623837409, 652319574, 726918453, 751396842, 865917402, 876243750, 882365190, 908714352, 984052317, 996302784, 4680215379, 4721985066, 4752360918, 4765380219, 4780620591, 4816217505, 4823206911, 4857619623
Offset: 1

Views

Author

Giovanni Resta, Nov 18 2005

Keywords

Comments

All terms are divisible by 3. - Chai Wah Wu, Feb 27 2024

Examples

			87624375 is in the sequence since its cube 672782675854638427734375 contains three 8's, six 7's, three 6's and so on.
		

Crossrefs

A114261 Numbers k such that the 5th power of k contains exactly 5 copies of each digit of k.

Original entry on oeis.org

961527834, 7351062489, 8105632794, 8401253976, 8731945026, 9164072385, 9238750614, 9615278340, 9847103256, 72308154699, 73510624890, 81056327940, 83170652949, 83792140506, 84012539760, 87319450260, 91602408573, 91640723850, 92387506140, 96152783400, 98471032560
Offset: 1

Views

Author

Giovanni Resta, Nov 18 2005

Keywords

Comments

Some of the early terms of the sequence are also pandigital, i.e. they contain all the 10 digits once. This is probably accidental, but quite curious!
All terms are divisible by 9. First decimal digit of a term is 6 or larger. - Chai Wah Wu, Feb 27 2024

Examples

			E.g. 961527834 is in the sequence since its 5th power 821881685441327565743977956591832631269739424 contains five 9's, five 6's, five 1's and so on.
		

Crossrefs

Programs

  • Python
    from itertools import count, islice
    from sympy import integer_nthroot
    def A114261_gen(): # generator of terms
        for l in count(1):
            a = integer_nthroot(10**(5*l-1),5)[0]
            if (a9:=a%9):
                a += 9-a9
            for b in range(a,10**l,9):
                if sorted(str(b)*5)==sorted(str(b**5)):
                    yield b
    A114261_list = list(islice(A114261_gen(),5)) # Chai Wah Wu, Feb 27 2024

Extensions

a(8)-a(9) from Ray Chandler, Aug 23 2023
a(10)-a(21) from Chai Wah Wu, Feb 28 2024

A370675 Number of unordered pairs of n-digit numbers k1, k2 such that their product has the same multiset of digits as in both k1 and k2 together.

Original entry on oeis.org

0, 7, 156, 3399, 112025, 4505706, 213002162
Offset: 1

Views

Author

Danila Potapov, Feb 26 2024

Keywords

Comments

Since multiplication and multiset union are commutative operations, we count unordered pairs, i.e. we can assume that k1 <= k2.
The sequence is nondecreasing, since for any x,y,p such that x*y=p, x0*y0=p00.
The numbers up to n=7 were verified by at least two independent implementations.
The property of possible residues mod 3 and mod 9 for A370676 also holds for this sequence.

Examples

			For n=2 the a(2)=7 solutions are:
  15 * 93 = 1395
  21 * 60 = 1260
  21 * 87 = 1827
  27 * 81 = 2187
  30 * 51 = 1530
  35 * 41 = 1435
  80 * 86 = 6880
		

Crossrefs

Cf. A114258, A370676 (number of such pairs with possibly unequal number of digits).

Programs

  • PARI
    a370675(n) = {my (np=0, n1=10^(n-1), n2=10*n1-1); for (k1=n1, n2, my(s1=digits(k1)); for (k2=k1, n2, my (s2=digits(k2)); my(sp=digits(k1*k2)); if (#s1+#s2==#sp && vecsort(concat(s1,s2)) == vecsort(sp), np++))); np} \\ Hugo Pfoertner, Feb 26 2024

A257867 Nonnegative integers n such that in balanced ternary representation the number of occurrences of each trit doubles when n is squared.

Original entry on oeis.org

314, 942, 2824, 2826, 2854, 3074, 3130, 3212, 8066, 8090, 8096, 8170, 8224, 8324, 8426, 8450, 8472, 8478, 8480, 8512, 8534, 8562, 8578, 8588, 8656, 9222, 9224, 9390, 9404, 9636, 9638, 24198, 24206, 24270, 24288, 24510, 24670, 24672, 24674, 24676, 24802, 24972
Offset: 1

Views

Author

Alois P. Heinz, May 11 2015

Keywords

Examples

			942 is in the sequence because 942 = 110L0L0_bal3 and 942^2 = 887364 = 1LL0001L1L0100_bal3, where L represents (-1).
		

Crossrefs

Programs

  • Maple
    p:= proc(n) local d, m, r; m:=n; r:=0;
          while m>0 do
            d:= irem(m,3,'m');
            if d=2 then m:=m+1 fi;
            r:=r+x^d
          od; r
        end:
    a:= proc(n) option remember; local k;
          for k from 1+`if`(n=1, 0, a(n-1))
          while p(k)*2<>p(k^2) do od; k
        end:
    seq(a(n), n=1..50);
  • Python
    def a(n):
        s=[]
        x=0
        while n>0:
            x=n%3
            n//=3
            if x==2:
                x=-1
                n+=1
            s.append(x)
        return s
    print([n for n in range(1, 25001) if a(n**2).count(-1)==2*a(n).count(-1) and a(n**2).count(1)==2*a(n).count(1) and a(n**2).count(0)==2*a(n).count(0)]) # Indranil Ghosh, Jun 07 2017

A257868 Negative integers n such that in balanced ternary representation the number of occurrences of each trit doubles when n is squared.

Original entry on oeis.org

-314, -898, -942, -2694, -2824, -2826, -2962, -3014, -3070, -3074, -8066, -8082, -8090, -8096, -8132, -8170, -8224, -8336, -8426, -8434, -8450, -8472, -8478, -8480, -8618, -8656, -8870, -8886, -8918, -9008, -9042, -9210, -9222, -9224, -24198, -24226, -24246
Offset: 1

Views

Author

Alois P. Heinz, May 11 2015

Keywords

Examples

			-898 is in the sequence because -898 = LL10L1L_bal3 and (-898)^2 = 806404 = 1LLLL00L1LLL11_bal3, where L represents (-1).
		

Crossrefs

Programs

  • Maple
    p:= proc(n) local d, m, r; m:=abs(n); r:=0;
          while m>0 do
            d:= irem(m, 3, 'm');
            if d=2 then m:=m+1 fi;
            r:=r+x^`if`(n>0, d, irem(3-d, 3))
          od; r
        end:
    a:= proc(n) option remember; local k;
          for k from -1+`if`(n=1, 0, a(n-1)) by -1
          while p(k)*2<>p(k^2) do od; k
        end:
    seq(a(n), n=1..50);
  • Python
    def a(n):
        s=[]
        l=[]
        x=0
        while n>0:
            x=n%3
            n//=3
            if x==2:
                x=-1
                n+=1
            s.append(x)
            l.append(-x)
        return [s, l]
    print([-n for n in range(1, 25001) if a(n**2)[0].count(-1)==2*a(n)[1].count(-1) and a(n**2)[0].count(1)==2*a(n)[1].count(1) and a(n**2)[0].count(0)==2*a(n)[1].count(0)]) # Indranil Ghosh, Jun 07 2017

A363160 Smallest positive integer m with all digits distinct such that m^n contains each digit of m exactly n times, or -1 if no such m exists.

Original entry on oeis.org

1, 406512, 516473892, 5702631489, 961527834, 7025869314, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
Offset: 1

Views

Author

Jean-Marc Rebert, Sep 07 2023

Keywords

Comments

For 7 <= n <= 185, I tried all possibilities with at most 10 distinct digits and I found no solution.
9876543210^186 has only 1859 < 186 * 10 = 1860 digits, so a(n) = -1 for n = 186.
So 9876543210^n has fewer than 10*n digits for n >= 186, so a(n) = -1 for n >= 186.

Examples

			a(1) = 1, because 1^1 = 1 has each digit of 1, 1 time, and no lesser number > 0 satisfies this.
a(2) = 406512, because 406512 has distinct digits, 406512^2 = 165252006144 has each digit of 406512, 2 times, and no lesser number satisfies this.
n a(n)        a(n)^n
1 1           1
2 406512      165252006144
3 516473892   137766973511455269432948288
4 5702631489  1057550783692741389295697108242363408641
5 961527834   821881685441327565743977956591832631269739424
6 7025869314  120281934463386157260042215510596389732740014997586987548736
		

Crossrefs

Programs

  • Mathematica
    hasDistinctDigitsQ[m_Integer?NonNegative]:=Length@IntegerDigits@m==Length@DeleteDuplicates@IntegerDigits@m;validNumberQ[n_Integer?NonNegative,m_Integer?NonNegative]:=AllTrue[Tally@IntegerDigits@m,Function[{digitFreq},MemberQ[Tally@IntegerDigits[m^n],{digitFreq[[1]],n*digitFreq[[2]]}]]];a[n_Integer?Positive,ex_Integer?Positive]:=Module[{m=1},Monitor[While[True,If[hasDistinctDigitsQ[m]&&validNumberQ[n,m],Return[m]];m++;If[m>10^(ex*n),Return[-1]];];m,m]];Table[a[n,7],{n,1,7}] (* Robert P. P. McKone, Sep 09 2023 *)
Previous Showing 11-17 of 17 results.