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!)
A083137 Smallest palindromic number relatively prime to all the previous terms. 3

%I #23 Jan 17 2018 03:27:14

%S 1,2,3,5,7,11,101,131,151,181,191,313,323,353,373,383,727,757,767,787,

%T 797,919,929,989,10001,10301,10501,10601,11111,11311,11411,12421,

%U 12721,12821,13031,13331,13831,13931,14141,14341,14741,14941,15151,15451

%N Smallest palindromic number relatively prime to all the previous terms.

%C 323 is the first composite entry. Conjecture: sequence is infinite.

%H R. J. Mathar and Giovanni Resta, <a href="/A083137/b083137.txt">Table of n, a(n) for n = 1..10000</a> (first 966 terms from R. J. Mathar)

%p isA002113 := proc(n)

%p if digrev(n) = n then

%p true;

%p else

%p false;

%p end if;

%p end proc:

%p A083137 := proc(n)

%p option remember;

%p if n =1 then

%p 1;

%p else

%p for p from procname(n-1)+1 do

%p if isA002113(p) then

%p rpr := true;

%p for i from 1 to n-1 do

%p if igcd(procname(i),p) > 1 then

%p rpr := false;

%p break;

%p end if;

%p end do:

%p if rpr then

%p return p ;

%p end if;

%p end if;

%p end do:

%p end if;

%p end proc: # _R. J. Mathar_, Aug 23 2014

%t a[1] = 1; a[n_] := a[n] = For[k = a[n-1]+1, True, k++, If[PalindromeQ[k] && AllTrue[Array[a, n-1], CoprimeQ[#, k]&], Return[k]]]; Array[a, 50] (* _Jean-François Alcover_, Jan 17 2018 *)

%Y Cf. A002113, A083136, A083139 (primes in this sequence).

%K base,nonn

%O 1,2

%A _Amarnath Murthy_ and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Apr 24 2003

%E Corrected and extended by _Reinhard Zumkeller_, May 05 2003

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 25 07:53 EDT 2024. Contains 371964 sequences. (Running on oeis4.)