login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A098826 Palindromes that are 1 more than a prime and 1 less than a triangular number. 0

%I

%S 44,252,434,464,4004,46664,2005002,49099094,414878414,431313134,

%T 4370654560734,200000050000002,417622181226714,202837977779738202,

%U 2574289191919824752

%N Palindromes that are 1 more than a prime and 1 less than a triangular number.

%e a(1) = 44 because 44 is the smallest (first) palindrome that is 1 more than a prime (43) and 1 less than a triangular number (45).

%t Do[t = n(n + 1)/2 - 1; If[EvenQ[t], If[PrimeQ[t - 1], If[t == FromDigits[ Reverse[ IntegerDigits[ t]]], Print[t]]]], {n, 10^9}] (* _Robert G. Wilson v, Nov 04 2004 *)

%t Select[Accumulate[Range[227*10^7]]-1,PalindromeQ[#]&&PrimeQ[#-1]&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, May 02 2020 *)

%K base,nonn

%O 1,1

%A Anonymous, Nov 02 2004

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 9 19:37 EDT 2021. Contains 343746 sequences. (Running on oeis4.)