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.

A356961 Integers k such that A014841(k) = A014841(k+1).

Original entry on oeis.org

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

Views

Author

Michel Marcus, Sep 06 2022

Keywords

Crossrefs

Cf. A014841.

Programs

  • 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 *)
  • 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