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.

A371695 The smallest composite number that divides the reverse of the concatenation of its ascending ordered prime factors, with repetition, when written in base n.

This page as a plain text file.
%I A371695 #17 Apr 16 2024 13:33:07
%S A371695 623,4,114,4,57,4,9,4,26,4,185,4,9,4,1718,4,343,4,9,4,70,4,25,4,9,4,
%T A371695 195,4,226,4,9,4,25,4,123,4,9,4,654,4,862,4,9,4,42,4,49,4,9,4,3385,4,
%U A371695 25,4,9,4,238,4,202,4,9,4,25,4,453,4,9,4,2435,4,721,4,9,4,49,4,70,4,9,4,186
%N A371695 The smallest composite number that divides the reverse of the concatenation of its ascending ordered prime factors, with repetition, when written in base n.
%C A371695 See A371641 for an explanation of multiple terms being 4 and 9. The largest number in the first 10000 terms is a(5980) = 1030778.
%H A371695 Scott R. Shannon, <a href="/A371695/b371695.txt">Table of n, a(n) for n = 2..10000</a>
%F A371695 If n+1 is composite, then a(n) <= A020639(n+1)^2. The numbers n where n+1 is composite and a(n) < A020639(n+1)^2 are 288, 298, 340, 360, 376, 516, 526, 550, 582, 736, ... and appear to be identical to A371948. - _Chai Wah Wu_, Apr 16 2024
%e A371695 a(2) = 623 as 623 = 7_10 * 89_10 = 111_2 * 1011001_2 = "1111011001"_2 which when reversed is "1001101111"_2 = 623_10 which is divisible by 623.
%e A371695 a(4) = 114 as 114 = 2_10 * 3_10 * 19_10 = 2_4 * 3_4 * 103_4 = "23103"_4 which when reversed is "30132"_4 = 798_10 which is divisible by 114.
%o A371695 (Python)
%o A371695 from itertools import count
%o A371695 from sympy.ntheory import digits
%o A371695 from sympy import factorint, isprime
%o A371695 def fromdigits(d, b):
%o A371695     n = 0
%o A371695     for di in d: n *= b; n += di
%o A371695     return n
%o A371695 def a(n):
%o A371695     for k in count(4):
%o A371695         if isprime(k): continue
%o A371695         sf = []
%o A371695         for p, e in list(factorint(k).items())[::-1]:
%o A371695             sf.extend(e*digits(p, n)[1:][::-1])
%o A371695         if fromdigits(sf, n)%k == 0:
%o A371695             return k
%o A371695 print([a(n) for n in range(2, 83)]) # _Michael S. Branicky_, Apr 16 2024
%Y A371695 Cf. A020639, A371641, A027746, A259047, A322843, A248915, A371948.
%K A371695 nonn,base
%O A371695 2,1
%A A371695 _Scott R. Shannon_, Apr 03 2024