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.

A351807 Integers m such that pod(m) divides pod(m^2) where pod = product of digits = A007954.

Original entry on oeis.org

1, 2, 3, 5, 6, 8, 11, 12, 13, 15, 16, 18, 19, 21, 22, 23, 25, 26, 27, 28, 31, 32, 33, 36, 41, 42, 43, 45, 47, 48, 49, 51, 52, 53, 55, 61, 62, 63, 64, 66, 68, 71, 74, 76, 78, 82, 83, 84, 93, 94, 95, 96, 97, 98, 99, 111, 112, 113, 114, 115, 116, 118, 121, 122, 123
Offset: 1

Views

Author

Bernard Schott, Feb 19 2022

Keywords

Comments

Inspired by A351650 where pod is replaced by sod.
All terms are zeroless (A052382).
Repunits form a subsequence (A002275).
Integers m without 0 and such that m^2 has a 0 form a subsequence (A134844).
The smallest term k such that the corresponding quotient = n is A351809(n).

Examples

			Product of digits of 27 = 2*7 = 14; then 27^2 = 729, product of digits of 729 = 7*2*9 = 81; as 81 divides 729, 27 is a term.
		

Crossrefs

Cf. A007954, A002473, A351808 (corresponding quotients), A351809.
Subsequences: A002275, A134844.

Programs

  • Mathematica
    pod[n_] := Times @@ IntegerDigits[n]; Select[Range[120], FreeQ[IntegerDigits[#], 0] && Divisible[pod[#^2], pod[#]] &] (* Amiram Eldar, Feb 19 2022 *)
  • PARI
    isok(m) = my(d=digits(m)); vecmin(d) && denominator(vecprod(digits(m^2))/vecprod(d)) == 1; \\ Michel Marcus, Feb 19 2022
  • Python
    from math import prod
    def pod(n): return prod(map(int, str(n)))
    def ok(m): pdm = pod(m); return pdm > 0 and pod(m*m)%pdm == 0
    print([m for m in range(124) if ok(m)]) # Michael S. Branicky, Feb 19 2022
    

Extensions

More terms from Amiram Eldar, Feb 19 2022

A351808 a(n) is the quotient obtained when pod(m) divides pod(m^2), with pod = product of digits = A007954 and m = A351807(n).

Original entry on oeis.org

1, 2, 3, 2, 3, 3, 2, 8, 18, 4, 10, 3, 2, 8, 32, 15, 6, 21, 9, 14, 18, 0, 0, 6, 12, 21, 24, 0, 0, 0, 0, 0, 0, 0, 0, 7, 32, 81, 0, 10, 4, 0, 30, 35, 0, 21, 144, 0, 64, 32, 0, 2, 0, 0, 0, 12, 80, 252, 243, 12, 60, 27, 48, 256, 15, 30, 140, 36, 8, 14, 336, 96, 144
Offset: 1

Views

Author

Bernard Schott, Feb 20 2022

Keywords

Comments

a(n) = 0 iff m = A351807(n) is a term of A134844.
As pod(m) is 7-smooth number and pod(m^2) can be 0 (see example), all terms of the sequence are in {0} union A002473. The smallest term k such that the corresponding quotient = 0 or A002473(n) is A351809(n).

Examples

			A351807(9) = 13, then pod(13) = 1*3 = 3 while pod(13^2) = pod(169) = 1*6*9 = 54; hence, a(9) = 54/3 = 18.
A351807(23) = 33, then pod(33) = 3*3 = 9 while pod(33^2) = pod(1089) = 1*0*8*9 = 0; hence, a(23) = 0.
		

Crossrefs

Programs

  • Mathematica
    pod[n_] := Times @@ IntegerDigits[n]; r[n_] := If[(p = pod[n]) > 0, pod[n^2]/p, 1/2]; Select[r /@ Range[200], IntegerQ] (* Amiram Eldar, Feb 21 2022 *)
  • PARI
    lista(nn) = {my(list=List()); for (m=1, nn, my(d=digits(m), q); if (vecmin(d) && denominator(q = vecprod(digits(m^2))/vecprod(d)) == 1, listput(list, q);); ); Vec(list);} \\ Michel Marcus, Feb 21 2022
    
  • Python
    from math import prod
    from itertools import count, islice
    def A351808_gen(): # generator of terms
        return (q for q, r in (divmod(prod(int(d) for d in str(m**2)),prod(int(d) for d in str(m))) for m in count(1) if '0' not in str(m)) if r == 0)
    A351808_list = list(islice(A351808_gen(),20)) # Chai Wah Wu, Feb 25 2022

Extensions

More terms from Amiram Eldar, Feb 21 2022
Showing 1-2 of 2 results.