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.

A353339 Number of integers b with n > b > 1 such that the base-b representation of n is periodic.

This page as a plain text file.
%I A353339 #5 Apr 14 2022 15:03:14
%S A353339 0,0,1,1,2,1,2,2,2,4,1,2,2,2,3,2,3,4,1,3,4,2,1,4,1,4,3,4,1,4,3,3,3,4,
%T A353339 2,5,2,2,2,5,1,5,2,3,4,2,1,5,1,5,4,4,1,5,2,4,3,2,1,7,1,3,5,3,5,5,1,5,
%U A353339 2,5,1,5,3,3,3,3,2,5,1,6,2,4,1,7,4,3,2
%N A353339 Number of integers b with n > b > 1 such that the base-b representation of n is periodic.
%e A353339 For n = 10: The base-2, base-3, base-4 and base-9 representations of 10 are 1010, 0101, 22 and 11, respectively, and these are the only representations that are periodic, so a(10) = 4.
%o A353339 (PARI) is(n, b) = for (w=1, oo, my (d=digits(n, b^w)); if (#d<=1, return (0), #Set(d)==1, return (1))) \\ after _Rémy Sigrist_ in A321513
%o A353339 a(n) = my(i=0); for(b=2, n-1, if(is(n, b), i++)); i
%Y A353339 Cf. A121016, A242138, A242139, A321513.
%K A353339 nonn,base
%O A353339 1,5
%A A353339 _Felix Fröhlich_, Apr 14 2022