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!)
A046332 Palindromes with exactly 6 prime factors (counted with multiplicity). 4

%I #13 Dec 23 2014 18:18:21

%S 2772,2992,6776,8008,21112,21712,21912,23632,23832,25452,25752,25952,

%T 27472,28782,29392,40104,40304,40404,42024,42924,44044,44144,44744,

%U 44944,45954,46764,46864,48984,53235,54945,55755,59895,60606,61216

%N Palindromes with exactly 6 prime factors (counted with multiplicity).

%H Chai Wah Wu, <a href="/A046332/b046332.txt">Table of n, a(n) for n = 1..5000</a>

%p N:= 6: # to get all terms of up to N digits

%p digrev:= proc(n) local L,Ln; L:= convert(n,base,10);Ln:= nops(L);

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

%p end proc:

%p Res:= NULL:

%p for d from 2 to N do

%p if d::even then

%p m:= d/2;

%p Res:= Res, select(numtheory:-bigomega=6,

%p [seq](n*10^m + digrev(n), n=10^(m-1)..10^m-1));

%p else

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

%p Res:= Res, select(numtheory:-bigomega=6,

%p [seq](seq(n*10^(m+1)+y*10^m+digrev(n), y=0..9), n=10^(m-1)..10^m-1));

%p fi

%p od:

%p map(op,[Res]); # _Robert Israel_, Dec 23 2014

%o (Python)

%o from sympy import factorint

%o def palQgen10(l): # generator of palindromes in base 10 of length <= 2*l

%o ....if l > 0:

%o ........yield 0

%o ........for x in range(1,l+1):

%o ............for y in range(10**(x-1),10**x):

%o ................s = str(y)

%o ................yield int(s+s[-2::-1])

%o ............for y in range(10**(x-1),10**x):

%o ................s = str(y)

%o ................yield int(s+s[::-1])

%o A046332_list = [x for x in palQgen10(4) if sum(list(factorint(x).values())) == 6]

%o # _Chai Wah Wu_, Dec 21 2014

%Y Cf. A046306, A046319.

%K nonn,base

%O 1,1

%A _Patrick De Geest_, Jun 15 1998

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 May 12 16:52 EDT 2024. Contains 372492 sequences. (Running on oeis4.)