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).

This page as a plain text file.
%I A356961 #10 Sep 06 2022 20:34:30
%S A356961 8,16,64,104,3954,4146,7374,9294,28035,35166,37218,38154,39318,40578,
%T A356961 42308,42774,48748,50214,67638,68106,75918,78882,87294,87836,89382,
%U A356961 90642,94074,96124,102822,107324,108294,108534,118016,118806,131046,153798,157254,163182,166494,168486
%N A356961 Integers k such that A014841(k) = A014841(k+1).
%t A356961 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 *)
%o A356961 (PARI) f(n) = sum(b=2, n-1, sumdigits(n, b) % b); \\ A014841
%o A356961 isok(k) = f(k) == f(k+1);
%o A356961 (Python)
%o A356961 from sympy.ntheory import digits
%o A356961 from itertools import count, islice
%o A356961 def f(n): return sum(sum(digits(n, b)[1:])%b for b in range(2, n))
%o A356961 def agen(): # generator of terms
%o A356961     f0, f1 = f(3), f(4)
%o A356961     for k in count(3):
%o A356961         if f0 == f1: yield k
%o A356961         f0, f1, = f1, f(k+2)
%o A356961 print(list(islice(agen(), 4))) # _Michael S. Branicky_, Sep 06 2022
%Y A356961 Cf. A014841.
%K A356961 nonn,base
%O A356961 1,1
%A A356961 _Michel Marcus_, Sep 06 2022