[go: up one dir, main page]

login
A356961
Integers k such that A014841(k) = A014841(k+1).
0
8, 16, 64, 104, 3954, 4146, 7374, 9294, 28035, 35166, 37218, 38154, 39318, 40578, 42308, 42774, 48748, 50214, 67638, 68106, 75918, 78882, 87294, 87836, 89382, 90642, 94074, 96124, 102822, 107324, 108294, 108534, 118016, 118806, 131046, 153798, 157254, 163182, 166494, 168486
OFFSET
1,1
MATHEMATICA
f[n_]:=Sum[Mod[Total[IntegerDigits[n, i]], i], {i, 2, n-1}]; kmax=97000; a={}; For[k=3, k<=kmax, k++, If[f[k]==f[k+1], AppendTo[a, k]]]; a (* Stefano Spezia, Sep 06 2022 *)
PROG
(PARI) f(n) = sum(b=2, n-1, sumdigits(n, b) % b); \\ A014841
isok(k) = f(k) == f(k+1);
(Python)
from sympy.ntheory import digits
from itertools import count, islice
def f(n): return sum(sum(digits(n, b)[1:])%b for b in range(2, n))
def agen(): # generator of terms
f0, f1 = f(3), f(4)
for k in count(3):
if f0 == f1: yield k
f0, f1, = f1, f(k+2)
print(list(islice(agen(), 4))) # Michael S. Branicky, Sep 06 2022
CROSSREFS
Cf. A014841.
Sequence in context: A222544 A307876 A166638 * A339355 A132794 A082982
KEYWORD
nonn,base
AUTHOR
Michel Marcus, Sep 06 2022
STATUS
approved