login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A081939 a(1) = 2; a(n+1) is the smallest palindrome > a(n) that has a common factor with a(n). 4

%I #14 Jul 04 2018 20:23:18

%S 2,4,6,8,22,33,44,55,66,77,88,99,111,141,171,222,232,242,252,262,272,

%T 282,292,404,414,424,434,444,454,464,474,484,494,585,595,616,626,636,

%U 646,656,666,676,686,696,717,747,777,828,838,848,858,868,878,888,898

%N a(1) = 2; a(n+1) is the smallest palindrome > a(n) that has a common factor with a(n).

%C Palindromes with an even number of digits are divisible by 11, so when a(n)=A002113(k) and A055642(a(n)) and A055642(A002113(k+1)) are even, a(n+1)=A002113(k+1). - _Robert Israel_, Jul 04 2018

%H Robert Israel, <a href="/A081939/b081939.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Pac#palindromes">Index entries for sequences related to palindromes</a>

%p dmax:= 5: # to get all terms with at most dmax digits

%p revdigs:= proc(n)

%p local L, Ln, i;

%p L:= convert(n, base, 10);

%p Ln:= nops(L);

%p add(L[i]*10^(Ln-i), i=1..Ln);

%p end proc:

%p P:= $0..9:

%p for d from 2 to dmax do

%p if d::even then

%p P:= P, seq(10^(d/2)*x + revdigs(x), x=10^(d/2-1)..10^(d/2)-1)

%p else

%p m:= (d-1)/2;

%p P:= P, seq(seq(10^(m+1)*x + 10^m*j+revdigs(x), j=0..9),x=10^(m-1)..10^m-1);

%p fi

%p od:

%p P:= [P]:

%p r:= P[3]: Res:= r: count:= 1:

%p for i from 4 to nops(P) do

%p if igcd(P[i],r) > 1 then

%p count:= count+1; r:= P[i]; Res:= Res, r;

%p fi

%p od:

%p Res; # _Robert Israel_, Jul 04 2018

%o (PARI) ispal(n) = my(d=digits(n)); d == Vecrev(d);

%o lista(nn) = {print1(last = 2, ", "); for (n=3, nn, if (ispal(n) && (gcd(n, last) != 1), print1(n, ", "); last = n;););} \\ _Michel Marcus_, Aug 12 2015

%Y Cf. A002113, A055642, A083136, A081938.

%K base,nonn

%O 1,1

%A _Amarnath Murthy_, Apr 02 2003

%E More terms from _David Wasserman_, Jun 29 2004

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 02:55 EDT 2024. Contains 371767 sequences. (Running on oeis4.)