login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A035134 Squarefree composite palindromes. 2
6, 22, 33, 55, 66, 77, 111, 141, 161, 202, 222, 262, 282, 303, 323, 393, 434, 454, 474, 494, 505, 515, 535, 545, 555, 565, 595, 606, 626, 646, 707, 717, 737, 767, 777, 818, 838, 858, 878, 898, 939, 949, 959, 969, 979, 989, 1001, 1111, 1221, 1441, 1551, 1661 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Palindromes with at least two and all distinct prime factors.

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

Eric Weisstein's World of Mathematics, Squarefree

MAPLE

N:= 4: # to get all terms with <= N digits

revdigs:= proc(n) local L, j, nL;

  L:= convert(n, base, 10); nL:= nops(L);

  add(L[j]*10^(nL-j), j=1..nL);

end proc:

palis:= $0..9:

for d from 2 to N do

  if d::even then

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

  else

    palis:= palis, seq(seq(x*10^((d+1)/2)+y*10^((d-1)/2)+revdigs(x), y=0..9), x=10^((d-3)/2)..10^((d-1)/2)-1);

  fi

od:

select(t -> not(isprime(t)) and numtheory:-issqrfree(t), [palis][3..-1]): # Robert Israel, Sep 18 2016

MATHEMATICA

sqfQ[n_]:=Max[Transpose[FactorInteger[n]][[2]]]<=1; palQ[n_]:=FromDigits[Reverse[IntegerDigits[n]]]==n; Select[Range[2, 1662], !PrimeQ[#] && sqfQ[#] && palQ[#] &] (* Jayanta Basu, May 12 2013 *)

PROG

(PARI) isA002113(n)=n=digits(n); for(i=1, #n\2, if(n[i]!=n[#n+1-i], return(0))); 1;

is(n) = n>1 && isA002113(n) && issquarefree(n) && !isprime(n) \\ Altug Alkan, Sep 19 2016

\\ in and output digits as a vector.

(PARI) nxtA002113(n)={my(d=n); i=(#d+1)\2; while(i&&d[i]==9, d[i]=0; d[#d+1-i]=0; i--); if(i, d[i]++; d[#d+1-i]=d[i], d=vector(#d+1); d[1]=d[#d]=1); d}\\sum(i=1, #d, 10^(#d-i)*d[i])}

\\ all terms up to n digits

lista(n) = {my(p = [6], l=List(), sp, i); while(#p <= n, sp = sum(i=1, #p, p[i]*10^(#p-i)); if(issquarefree(sp)&&!isprime(sp), listput(l, sp)); p=nxtA002113(p)); l} \\ David A. Corneth, Sep 19 2016

CROSSREFS

Cf. A002113, A005117, A035132, A035135.

Sequence in context: A069824 A015709 A020195 * A075799 A046392 A046408

Adjacent sequences:  A035131 A035132 A035133 * A035135 A035136 A035137

KEYWORD

nonn,base

AUTHOR

Patrick De Geest, Nov 15 1998

STATUS

approved

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 March 22 17:25 EDT 2019. Contains 321422 sequences. (Running on oeis4.)