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!)
A075808 Palindromic odd composite numbers that are the products of an odd number of distinct primes. 2
555, 595, 777, 969, 1001, 1221, 1551, 1771, 3333, 3553, 5335, 5555, 5665, 5885, 5995, 7337, 7557, 7667, 7777, 7887, 9339, 9669, 9779, 9889, 11211, 11811, 12121, 12621, 12921, 13731, 14241, 14541, 15051, 15951, 16261, 16761, 17171, 18381 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
555 = 3*5*37, 595 = 5*7*17 and 777 = 3*7*37 are palindromic, odd, composite and products of an odd number of distinct primes.
50505 = 3 * 5 * 7 * 13 * 37 is the first term with five factors.
125 = 5^3 and 5445 = 3^2 * 5 * 11^2 are not terms since they are not the products of distinct primes.
MAPLE
test := proc(n) local d; d := convert(n, base, 10); return ListTools[Reverse](d)=d and numtheory[mobius](n)=-1 and not isprime(n); end; a := []; for n from 1 to 30000 by 2 do if test(n) then a := [op(a), n]; end; od; a;
MATHEMATICA
Select[Range[2, 20000], ! PrimeQ[#] && OddQ[#] && PalindromeQ[#] &&
OddQ[Length[Transpose[FactorInteger[#]][[2]]]] &&
Max[Transpose[FactorInteger[#]][[2]]] == 1 &] (* Tanya Khovanova, Aug 26 2022 *)
PROG
(Python)
from sympy import isprime, factorint
from itertools import count, islice, product
def cond(n):
if n%2 == 0 or isprime(n): return False
f = factorint(n)
return len(f) == sum(f.values()) and len(f)&1
def oddpals(): # generator of odd palindromes
yield from [1, 3, 5, 7, 9]
for d in count(2):
for first in "13579":
for p in product("0123456789", repeat=(d-2)//2):
left = "".join(p); right = left[::-1]
for mid in [[""], "0123456789"][d%2]:
yield int(first + left + mid + right + first)
def agen(): yield from filter(cond, oddpals())
print(list(islice(agen(), 38))) # Michael S. Branicky, Aug 25 2022
CROSSREFS
Sequence in context: A205888 A186529 A274901 * A204365 A283158 A043511
KEYWORD
nonn,base
AUTHOR
Jani Melik, Oct 13 2002
EXTENSIONS
Edited by Dean Hickerson, Oct 21 2002
Name edited by Tanya Khovanova, Aug 26 2022
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 August 12 13:41 EDT 2024. Contains 375113 sequences. (Running on oeis4.)