login
A394059
a(n) is the smallest index k such that the subsequence b(k), b(k+1),..., b(k+n-1) is a palindrome of length n, where b(k) = prime(k) mod 6 = A039704(k).
2
1, 9, 3, 8, 3, 30, 3, 29, 16, 87, 23, 86, 22, 99, 140, 98, 140, 717, 140, 716, 140, 715, 139, 714, 3934, 12862, 3933, 26993, 5778, 26992, 20246, 348411, 20245, 488970, 20244, 488969, 20243, 488968, 76776, 1822976, 76775, 1822975, 76774, 3540352, 76773, 10884806, 5673605, 19624687, 5673604
OFFSET
1,2
COMMENTS
Conjecture: There exist infinitely many palindromes of every length in the sequence of residues of primes modulo 6.
The aim of this sequence is to study the local symmetries of the sequence A039704. To do this, we identify palindromes in subsequences of A039704.
LINKS
EXAMPLE
Initial solutions:
n a(n) palindrome
--------------------------------------------
1 1 [1]
2 9 [5, 5]
3 3 [5, 1, 5]
4 8 [1, 5, 5, 1]
5 3 [5, 1, 5, 1, 5]
6 30 [5, 1, 5, 5, 1, 5]
7 3 [5, 1, 5, 1, 5, 1, 5]
8 29 [1, 5, 1, 5, 5, 1, 5, 1]
9 16 [5, 5, 1, 1, 5, 1, 1, 5, 5]
10 87 [5, 1, 5, 1, 5, 5, 1, 5, 1, 5]
11 23 [5, 5, 1, 5, 1, 5, 1, 5, 1, 5, 5]
12 86 [5, 5, 1, 5, 1, 5, 5, 1, 5, 1, 5, 5]
MAPLE
with(numtheory):
Nmax := 50: Pmax := 500000:
b := Array(1..Pmax):
for k from 1 to Pmax do b[k] := irem(ithprime(k), 6) end do:
a := Array(1..Nmax, fill=infinity):
for k from 1 to Pmax do
r := 0:
while k-r >=1 and k+r <= Pmax and b[k-r]=b[k+r] do
n := 2*r+1: start := k-r:
if n <= Nmax and start < a[n] then a[n] := start: end if:
r := r+1:
end do:
r := 0:
while k-r >=1 and k+r+1 <= Pmax and b[k-r]=b[k+r+1] do
n := 2*r+2: start := k-r:
if n <= Nmax and start < a[n] then a[n] := start: end if:
r := r+1:
end do:
end do:
seq(a[n], n=1..Nmax);
PROG
(PARI) a(n, v) = for (i=1, #v-n, my(w = vector(n, k, v[i+k-1])); if (Vecrev(w) == w, return(i)); );
lista(nn) = my(v = primes(nn) % 6); for (n=1, 50, my(x = a(n, v)); if (x, print1(x, ", "), return));
lista(10^7) \\ Michel Marcus, Mar 10 2026
CROSSREFS
Sequence in context: A394833 A284832 A380599 * A387979 A358942 A266559
KEYWORD
nonn
AUTHOR
Michel Lagneau, Mar 09 2026
EXTENSIONS
More terms from Michel Marcus, Mar 10 2026
STATUS
approved