login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A239427
Numbers such that additive and multiplicative persistences coincide.
6
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 28, 29, 30, 31, 32, 33, 37, 38, 40, 41, 42, 46, 48, 50, 51, 56, 58, 60, 61, 64, 65, 67, 70, 71, 73, 76, 80, 81, 82, 83, 84, 85, 90, 92, 99, 100, 101, 102, 103, 104, 105, 106
OFFSET
1,3
COMMENTS
Numbers n for which A031286(n) = A031346(n).
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..66 from Arkadiusz Wesolowski)
Eric Weisstein's World of Mathematics, Additive Persistence
Eric Weisstein's World of Mathematics, Multiplicative Persistence
EXAMPLE
28 -> 10 -> 1 has additive persistence 2. 28 -> 16 -> 6 has multiplicative persistence 2. 28 is therefore in the sequence.
PROG
(PARI) for(n=0, 106, v=n; a=0; while(n>9, a++; n=sumdigits(n)); n=v; m=0; while(n>9, m++; d=digits(n); n=prod(k=1, #d, d[k])); n=v; if(a==m, print1(n, ", ")));
(Python)
from math import prod
def A031286(n):
ap = 0
while n > 9: n, ap = sum(map(int, str(n))), ap+1
return ap
def A031346(n):
mp = 0
while n > 9: n, mp = prod(map(int, str(n))), mp+1
return mp
def ok(n): return A031286(n) == A031346(n)
print([k for k in range(107) if ok(k)]) # Michael S. Branicky, Sep 17 2022
CROSSREFS
Supersequence of A239480. Cf. A031286, A031346, A064702.
Sequence in context: A298639 A276347 A076121 * A255422 A080681 A366186
KEYWORD
nonn,base
AUTHOR
STATUS
approved