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

A256114 Numbers n such that digit_product(n^2) = (digit_product(n))^2 and n mod 10 > 0.

Original entry on oeis.org

1, 2, 3, 101, 102, 103, 104, 105, 201, 202, 203, 205, 301, 302, 303, 305, 401, 402, 403, 405, 501, 502, 503, 504, 505, 506, 507, 508, 509, 601, 602, 603, 605, 609, 661, 701, 702, 703, 705, 708, 709, 801, 802, 803, 805, 901, 902, 903, 905, 906, 983
Offset: 1

Views

Author

Reiner Moewald, Mar 15 2015

Keywords

Comments

Contains i*10^d + j for i>=1, j mod 10 > 0, j < 10^d/(20*i+1). - Robert Israel, Jun 05 2015

Examples

			digit_product(661^2) = digit_product(436921) = 1296 = 36^2 = (digit_product(661))^2.
		

Crossrefs

Programs

  • Magma
    [t: j in [1..9], k in [0..100] | &*Intseq(t^2) eq &*Intseq(t)^2 where t is 10*k+j]; // Bruno Berselli, Jun 23 2015
  • Maple
    pdigs:= n -> convert(convert(n,base,10),`*`):
    select(t -> pdigs(t^2)=pdigs(t)^2, [seq(seq(10*k+j,j=1..9),k=0..1000)]); # Robert Israel, Jun 05 2015
  • Mathematica
    pod[n_] := Times@@ IntegerDigits@ n; Select[ Range[10^4], Mod[#, 10] > 0 && pod[#]^2 == pod[#^2] &] (* Giovanni Resta, Jun 23 2015 *)
  • Python
    def product_digits(n):
       results = 1
       while n > 0:
          remainder = n % 10
          results *= remainder
          n = (n-remainder)/10
       return results
    pos = 0
    for a in range(1,1000000):
       if product_digits(a*a) == (product_digits(a))*(product_digits(a)) and (a%10 > 0):
          pos += 1
          print(pos, a)
    

A278316 Odd numbers n such that q(n)^2 = q(n^2) != 0, where q(n) is the digit product on base 10.

Original entry on oeis.org

1, 3, 661, 983, 2631, 2893, 12385, 12893, 14661, 18615, 27519, 35383, 36213, 38691, 46215, 49231, 83631, 87291, 92843, 113865, 116683, 123415, 129815, 136423, 139261, 152619, 161683, 162435, 166817, 178119, 194725, 244635, 247941, 254663, 274165, 276941
Offset: 1

Views

Author

Volker Diels-Grabsch, Nov 18 2016

Keywords

Examples

			For n=3, a(3)=661: q(661)^2 = (6*6*1)^2 = 36^2 = 1296 = 4*3*6*9*2*1 = q(436921) = q(661^2).
		

References

  • Michael Huke, Solution to exercise psi-15 (German language article), WURZEL 11/2016, November 2016, page 252, http://wurzel.org/

Crossrefs

Odd terms of A256115. - Michel Marcus, Dec 04 2016

Programs

  • Mathematica
    Select[Range[1, 10^6, 2], And[MatchQ @@ #, Times @@ # != 0] &@{(Times @@ IntegerDigits@ #)^2, Times @@ IntegerDigits[#^2]} &] (* Michael De Vlieger, Dec 06 2016 *)
  • PARI
    pd(n) = my(d=digits(n)); prod(k=1, #d, d[k]);
    isok(n) = (n % 2) && (p = pd(n)^2) && (p == pd(n^2)); \\ Michel Marcus, Dec 04 2016

Extensions

More terms from Jon E. Schoenfield, Dec 02 2016
Showing 1-2 of 2 results.