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-3 of 3 results.

A257763 Zeroless numbers n such that n and n^2 have the same set of decimal digits.

Original entry on oeis.org

1, 4762, 4832, 12385, 14829, 26394, 34196, 36215, 49827, 68474, 72576, 74528, 79286, 79836, 94583, 94867, 96123, 98376, 123385, 123546, 124235, 124365, 124579, 124589, 125476, 125478, 126969, 129685, 135438, 139256, 139261, 139756, 149382, 152385, 156242
Offset: 1

Views

Author

Alois P. Heinz, May 07 2015

Keywords

Examples

			4762 is in the sequence because it is zeroless and 4762^2 = 22676644 has the same set of decimal digits as 4762: {2,4,6,7}.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local k, s;
          for k from 1+`if`(n=1, 0, a(n-1)) do
            s:= {convert(k, base, 10)[]};
            if not 0 in s and s={convert(k^2, base, 10)[]}
               then return k fi
          od
        end:
    seq(a(n), n=1..10);
  • Mathematica
    sameQ[n_]:=Union[IntegerDigits[n]]==Union[IntegerDigits[n^2]];Select[Range@156242,And[FreeQ[IntegerDigits[#],0],sameQ[#]]&] (* Ivan N. Ianakiev, May 08 2015 *)
  • PARI
    isok(n) = vecmin(d=digits(n)) && Set(d) == Set(digits(n^2)); \\ Michel Marcus, May 31 2015
  • Python
    A257763_list = [n for n in range(1,10**6) if not '0' in str(n) and set(str(n)) == set(str(n**2))] # Chai Wah Wu, May 31 2015
    

Formula

{A029793} intersect {A052382}.

A257774 Numbers n such that the products of the decimal digits of n^2 and n^3 coincide, n^2 and n^3 are zeroless.

Original entry on oeis.org

1, 5, 7, 6057, 292839, 1295314, 4897814, 4967471, 5097886, 6010324, 6919146, 7068165, 7189558, 9465077, 15347958, 22842108, 24463917, 26754863, 43378366, 48810128, 48885128, 50833026, 54588458, 54649688, 68093171, 69925865, 69980346, 73390374, 74357144
Offset: 1

Views

Author

Pieter Post, May 08 2015

Keywords

Comments

This sequence is more sporadic than A257760. It appears there is no sequence for zeroless numbers n and n^3 such that the products of the decimal digits coincide, except for the trivial 1.

Examples

			5 is in the sequence since 5^2 = 25 and 5^3 = 125 and we have 2*5 = 1*2*5 = 10 > 0.
6057 is in the sequence since 6057^2 = 36687249 and 6057^3 = 222214667193 and we have 3*6*6*8*7*2*4*9 = 2*2*2*2*1*4*6*6*7*1*9*3 = 435456 > 0.
		

Crossrefs

Programs

  • Mathematica
    pod[n_] := Times@@IntegerDigits@n; Select[Range[10^7], pod[#^3] == pod[#^2] > 0 &] (* Giovanni Resta, May 08 2015 *)

Extensions

Corrected and extended by Giovanni Resta, May 08 2015

A257968 Zeroless numbers n such that the product of digits of n, the product of digits of n^2 and the product of digits of n^3 form a geometric progression.

Original entry on oeis.org

1, 2, 38296, 151373, 398293, 422558, 733381, 971973, 2797318, 3833215, 6988327, 7271256, 8174876, 8732657, 9872323, 9981181, 11617988, 11798921, 14791421, 15376465, 15487926, 15625186, 16549885, 18543639, 21316582, 21492828, 22346329, 22867986, 23373644
Offset: 1

Views

Author

Pieter Post, May 15 2015

Keywords

Comments

This sequence appears to be infinite.

Examples

			38296 is in the sequence because the pod equals 2592 (=3*8*2*9*6), pod(38296^2) is 622080, pod(38296^3) is 149299200. 2592*240 = 622080 => 622080*240 = 149299200.
		

Crossrefs

Cf. A052382 (zeroless numbers), A007954 (product of digits).

Programs

  • Mathematica
    pod[n_]:=Times@@IntegerDigits@n; Select[Range[10^8], pod[#^3] pod[#] == pod[#^2]^2 >0 &] (* Vincenzo Librandi, May 16 2015 *)
  • PARI
    pod(n) = my(d = digits(n)); prod(k=1, #d, d[k]);
    isok(n) = (pd = pod(n)) && (pdd = pod(n^2)) && (pdd/pd == pod(n^3)/pdd); \\ Michel Marcus, May 30 2015
  • Python
    def pod(n):
        kk = 1
        while n > 0:
            kk= kk*(n%10)
            n =int(n//10)
        return kk
    for i in range (1,10**7):
        if pod(i**3)*pod(i)==pod(i**2)**2 and pod(i**2)!=0:
            print (i, pod(i),pod(i**2),pod(i**3),pod(i**2)//pod(i))
    

Formula

pod(n^3)/pod(n^2)=pod(n^2)/pod(n), where pod(n) = A007954(n).

Extensions

a(17)-a(29) from Giovanni Resta, May 15 2015
Showing 1-3 of 3 results.