OFFSET
1,2
LINKS
Reinhard Zumkeller, Rows n = 1..1024 of table, flattened
Michael De Vlieger, Plot of pi(p) such that T(n,k) = p for n = 1..4096.
EXAMPLE
. n T(n,*) | in binary
. --- --------------------|-------------------------------------------
. 1: 1 | 00001: .
. 2: 2 | 00100: ___10
. 3: 3 | 00011: ___11
. 4: 2 | 00100: __10_
. 5: 2 5 | 00101: ___10 _11__
. 6: 2 3 | 00110: ___10 __11_
. 7: 3 7 | 00111: __11_ __111
. 8: 2 | 01000: _10__
. 9: 2 | 01001: _10__
. 10: 2 5 | 01010: _10__ _101_
. 11: 2 3 5 11 | 01011: _10__ ___11 _101_ 01011
. 12: 2 3 | 01100: ___10 _11__
. 13: 2 3 5 13 | 01101: __10_ _11__ __101 01101
. 14: 2 3 7 | 01110: ___10 _11__ _111_
. 15: 3 7 | 01111: _11__ _111_
. 16: 2 | 10000: 10___
. 17: 2 17 | 10001: 10___ 10001
. 18: 2 | 10010: 10___
. 19: 2 3 19 | 10011: 10___ ___11 10011
. 20: 2 5 | 10100: 10___ 101__
. 21: 2 5 | 10101: 10___ 101__
. 22: 2 3 5 11 | 10110: 10___ __11_ 101__ 10110
. 23: 2 3 5 7 11 23 | 10111: 10___ __11_ 101__ __111 1011_ 10111
. 24: 2 3 | 11000: _10__ 11___
. 25: 2 3 | 11001: _10__ 11___ .
MATHEMATICA
Array[Union@ Select[FromDigits[#, 2] & /@ Rest@ Subsequences@ IntegerDigits[#, 2], PrimeQ] &, 34] /. {} -> {1} // Flatten (* Michael De Vlieger, Jan 26 2022 *)
PROG
(Haskell)
a225243 n k = a225243_tabf !! (n-1) !! (k-1)
a225243_row n = a225243_tabf !! (n-1)
a225243_tabf = [1] : map (filter ((== 1) . a010051')) (tail a165416_tabf)
(Python)
from sympy import isprime
from itertools import count, islice
def primess(n):
b = bin(n)[2:]
ss = (int(b[i:j], 2) for i in range(len(b)) for j in range(i+2, len(b)+1))
return sorted(set(k for k in ss if isprime(k)))
def agen():
yield 1
for n in count(2):
yield from primess(n)
print(list(islice(agen(), 82))) # Michael S. Branicky, Jan 26 2022
CROSSREFS
KEYWORD
nonn,base,tabf
AUTHOR
Reinhard Zumkeller, Aug 14 2013
STATUS
approved