This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A046332 #22 Jun 07 2024 08:05:19 %S A046332 2772,2992,6776,8008,21112,21712,21912,23632,23832,25452,25752,25952, %T A046332 27472,28782,29392,40104,40304,40404,42024,42924,44044,44144,44744, %U A046332 44944,45954,46764,46864,48984,53235,54945,55755,59895,60606,61216 %N A046332 Palindromes with exactly 6 prime factors (counted with multiplicity). %H A046332 Chai Wah Wu, <a href="/A046332/b046332.txt">Table of n, a(n) for n = 1..5000</a> %F A046332 Intersection of A002113 and A046306. - _M. F. Hasler_, Jun 06 2024 %p A046332 N:= 6: # to get all terms of up to N digits %p A046332 digrev:= proc(n) local L,Ln; L:= convert(n,base,10);Ln:= nops(L); %p A046332 add(L[i]*10^(Ln-i),i=1..Ln); %p A046332 end proc: %p A046332 Res:= NULL: %p A046332 for d from 2 to N do %p A046332 if d::even then %p A046332 m:= d/2; %p A046332 Res:= Res, select(numtheory:-bigomega=6, %p A046332 [seq](n*10^m + digrev(n), n=10^(m-1)..10^m-1)); %p A046332 else %p A046332 m:= (d-1)/2; %p A046332 Res:= Res, select(numtheory:-bigomega=6, %p A046332 [seq](seq(n*10^(m+1)+y*10^m+digrev(n), y=0..9), n=10^(m-1)..10^m-1)); %p A046332 fi %p A046332 od: %p A046332 map(op,[Res]); # _Robert Israel_, Dec 23 2014 %o A046332 (Python) %o A046332 from sympy import factorint %o A046332 def palQgen10(l): # generator of palindromes in base 10 of length <= 2*l %o A046332 if l > 0: %o A046332 yield 0 %o A046332 for x in range(1,l+1): %o A046332 for y in range(10**(x-1),10**x): %o A046332 s = str(y) %o A046332 yield int(s+s[-2::-1]) %o A046332 for y in range(10**(x-1),10**x): %o A046332 s = str(y) %o A046332 yield int(s+s[::-1]) %o A046332 A046332_list = [x for x in palQgen10(4) if sum(list(factorint(x).values())) == 6] %o A046332 # _Chai Wah Wu_, Dec 21 2014 %o A046332 (PARI) A046332_upto(N, start=1, num_fact=6)={ my(L=List()); while(N >= start = nxt_A002113(start), bigomega(start)==num_fact && listput(L, start)); L} \\ _M. F. Hasler_, Jun 06 2024 %Y A046332 Cf. A002113 (palindromes), A046306 (bigomega = 6), A046319. %Y A046332 Cf. A046396 (similar but terms must be squarefree), A373466 (similar, but only distinct prime divisors are counted). %K A046332 nonn,base %O A046332 1,1 %A A046332 _Patrick De Geest_, Jun 15 1998