The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A083831 Palindromes n such that 4n + 1 is also a palindrome. 2
1, 2, 8, 88, 131, 141, 232, 242, 888, 8888, 13031, 13131, 13231, 14041, 14141, 14241, 23032, 23132, 23232, 24042, 24142, 24242, 88888, 888888, 1303031, 1304031, 1313131, 1314131, 1323231, 1324231, 1403041, 1404041, 1413141, 1414141 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Among infinite subsequences are the repdigits 8...8 = 8*(10^k-1)/9. It appears that the only terms with an even number of digits are these for even k. - Robert Israel, Apr 04 2018
LINKS
EXAMPLE
13231 and 52925 are palindromes and 4*13231+1=52925, therefore 13231 is a term.
MAPLE
N:= 100: # to get the first N terms
fe:= proc(x, d) local L;
L:= convert(x, base, 10);
add(L[j]*(10^(d-j)+10^(d+j-1)), j=1..d)
end proc:
fo:= proc(x, d) local L;
L:= convert(x, base, 10);
add(L[j]*(10^(d-j)+10^(d+j-2)), j=2..d) + L[1]*10^(d-1);
end proc:
ispali:= proc(n) local L;
L:= convert(n, base, 10);
L = ListTools:-Reverse(L)
end proc:
count:= 0: Res:= NULL:
for d from 1 while count < N do
for x from 10^(d-1) to 10^d-1 while count < N do
y:= fo(x, d);
if ispali(4*y+1) then
count:= count+1; Res:= Res, y;
fi
od:
for x from 10^(d-1) to 10^d-1 while count < N do
y:= fe(x, d);
if ispali(4*y+1) then
count:= count+1; Res:= Res, y;
fi
od:
od:
Res; # Robert Israel, Apr 04 2018
MATHEMATICA
Select[Range[15*10^5], AllTrue[{#, 4#+1}, PalindromeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 08 2018 *)
PROG
(PARI) isok(n) = my(dn = digits(n), dm = digits(4*n+1)); (Vecrev(dn) == dn) && (Vecrev(dm) == dm); \\ Michel Marcus, Apr 04 2018
CROSSREFS
Sequence in context: A276991 A000532 A333366 * A134245 A141313 A009144
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 09 2003
EXTENSIONS
Corrected and extended by Reinhard Zumkeller and Ray Chandler, May 18 2003
STATUS
approved

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 June 3 10:30 EDT 2024. Contains 373060 sequences. (Running on oeis4.)