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.

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.

This page as a plain text file.
%I A248145 #45 Oct 05 2024 08:56:28
%S A248145 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,
%T A248145 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,
%U A248145 3,17,1,219,1,2,4,10,1,2,1,1,46,1303,4,2,1,2,2,1
%N 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.
%C A248145 3^m, m>=1, is of the considered form 3^k*prime, k=m-1>=0, prime=3.
%C A248145 The first blocks of the partition are |1,3|,|5|,|7|,|9|,|11|,|13|,|15|,|17|,|19|,|21|,|23|,|25,27,29|,|31|,|33|,|35,37|,...
%e A248145 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.
%o A248145 (Python)
%o A248145 from gmpy2 import is_prime
%o A248145 from itertools import count, islice
%o A248145 def c(n):
%o A248145     if n < 3: return False
%o A248145     while n%3 == 0: n //= 3
%o A248145     return n == 1 or is_prime(n)
%o A248145 def agen(): # generator of terms
%o A248145     i = 1
%o A248145     while True:
%o A248145         s, an = str(i), 1
%o A248145         while not c(t:=int(s)): i += 2; s += str(i); an += 1
%o A248145         yield an
%o A248145         i += 2
%o A248145 print(list(islice(agen(), 78))) # _Michael S. Branicky_, Oct 05 2024
%Y A248145 Cf. A103899, A248146.
%K A248145 nonn,base
%O A248145 1,1
%A A248145 _Vladimir Shevelev_, Oct 02 2014
%E A248145 a(43) and beyond from _Michael S. Branicky_, Oct 05 2024