A360507 Numbers k such that A360506(k) is prime.
2, 5, 13, 57, 109, 638, 3069
Offset: 1
Examples
A360506(5) = 4003 is prime, so 5 is a term.
Extensions
a(6)-a(7) from Michael S. Branicky, Feb 18 2023
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.
A360506(5) = 4003 is prime, so 5 is a term.
a[n_] := FromDigits @ Flatten @ IntegerDigits[Range[n, 1, -1], 3]; Array[a, 15] (* Amiram Eldar, Feb 18 2023 *)
a(n) = strjoin(concat([digits(k, 3) | k <- Vecrev([1..n])])) \\ Rémy Sigrist, Feb 18 2023
from sympy.ntheory import digits def a(n): return int("".join("".join(map(str, digits(k, 3)[1:])) for k in range(n, 0, -1))) print([a(n) for n in range(1, 16)]) # Michael S. Branicky, Feb 18 2023
# faster version for initial segment of sequence from sympy.ntheory import digits from itertools import count, islice def agen(s=""): yield from (int(s:="".join(map(str, digits(n, 3)[1:]))+s) for n in count(1)) print(list(islice(agen(), 15))) # Michael S. Branicky, Feb 18 2023
Comments