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.

A357430 a(n) is the least integer > 1 such that its digit representation in base n is equal to the digit representation in base n of the initial terms of its set of divisors in increasing order.

This page as a plain text file.
%I A357430 #17 Oct 06 2022 04:30:49
%S A357430 6,48,6,182,8,66,10,102,12,1586,14,198,16,258,18,345,20,402,22,486,24,
%T A357430 306484,26,678,28,786,30,26102,32,1026,34,1158,36,1335,38,1446,40,
%U A357430 1602,42,204741669824,44,1938,46,2118,48,2355,50,2502,52,2706,54,8199524,56
%N A357430 a(n) is the least integer > 1 such that its digit representation in base n is equal to the digit representation in base n of the initial terms of its set of divisors in increasing order.
%H A357430 Rémy Sigrist, <a href="/A357430/b357430.txt">Table of n, a(n) for n = 2..148</a>
%F A357430 a(2*n) = 2*n + 2 for any n > 1. - _Rémy Sigrist_, Sep 29 2022
%o A357430 (PARI) isok(k, b) = my(s=[]); fordiv(k, d, s=concat(s, digits(d, b)); if (fromdigits(s, b)==k, return(1)); if (fromdigits(s, b)> k, return(0)));
%o A357430 a(n) = my(k=2); while(! isok(k, n), k++); k;
%o A357430 (Python)
%o A357430 from sympy import divisors
%o A357430 from sympy.ntheory import digits
%o A357430 from itertools import count, islice
%o A357430 def ok(n, b):
%o A357430     target, s = digits(n, b)[1:], []
%o A357430     if target[0] != 1: return False
%o A357430     for d in divisors(n):
%o A357430         s += digits(d, b)[1:]
%o A357430         if len(s) >= len(target): return s == target
%o A357430         elif not target[:len(s)] == s: return False
%o A357430 def a(n):
%o A357430     return next(i for d in count(1) for i in range(n**d, 2*n**d) if ok(i, n))
%o A357430 print([a(n) for n in range(2, 41)]) # _Michael S. Branicky_, Oct 05 2022
%Y A357430 Cf. A175252 (base 10), A357428 (base 2), A357429 (base 3).
%K A357430 nonn,base
%O A357430 2,1
%A A357430 _Michel Marcus_, Sep 28 2022
%E A357430 More terms from _Rémy Sigrist_, Sep 29 2022