A248145 Consider the partition of the positive odd integers into minimal blocks such that concatenation of numbers in each block is a number of the form 3^k*prime, k>=0. Sequence lists numbers of odd integers in the blocks.
2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 7, 1, 1, 1, 2, 1, 1, 1, 2, 6, 1, 5, 11, 7, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 348, 2, 20, 30, 453, 2, 1, 2, 3, 17, 1, 219, 1, 2, 4, 10, 1, 2, 1, 1, 46, 1303, 4, 2, 1, 2, 2, 1
Offset: 1
Examples
The 12th block of partition is |25,27,29|, since we have 25=5^2, 2527=7*19^2, 252729=3^2*28081, and only the last number is of the required form. So a(12)=3.
Programs
-
Python
from gmpy2 import is_prime from itertools import count, islice def c(n): if n < 3: return False while n%3 == 0: n //= 3 return n == 1 or is_prime(n) def agen(): # generator of terms i = 1 while True: s, an = str(i), 1 while not c(t:=int(s)): i += 2; s += str(i); an += 1 yield an i += 2 print(list(islice(agen(), 78))) # Michael S. Branicky, Oct 05 2024
Extensions
a(43) and beyond from Michael S. Branicky, Oct 05 2024
Comments