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!)
A361181 Numbers such that both sum and product of the prime factors (without multiplicity) are palindromic. 0
2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 16, 18, 24, 25, 27, 32, 36, 48, 49, 54, 64, 72, 81, 96, 101, 108, 121, 125, 128, 131, 144, 151, 162, 181, 191, 192, 216, 243, 256, 288, 313, 324, 343, 353, 373, 383, 384, 432, 486, 512, 576, 625, 648, 717, 727, 729, 757, 768, 787, 797, 864, 919, 929, 972, 989 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
A002385 (Palindromic primes) is a subsequence of this sequence.
LINKS
EXAMPLE
2151 is a term because 2151=3^2*239; 3+239=242; 3*239=717.
MATHEMATICA
Select[Range[2, 1000], And @@ PalindromeQ /@ {Plus @@ (p = FactorInteger[#][[;; , 1]]), Times @@ p} &] (* Amiram Eldar, Mar 06 2023 *)
PROG
(PARI) ispal(n) = my(d=digits(n)); d == Vecrev(d) \\ A002113
for(n=2, 1e5; f=factor(n); sf=0; mf=1; for(j=1, #f~, sf+=f[j, 1]; mf*=f[j, 1]); if(ispal(sf) && ispal(mf), print1(n, ", ")))
(Python)
from math import prod
from sympy import factorint
def ispal(n): return (s:=str(n)) == s[::-1]
def ok(n): return ispal(sum(f:=factorint(n))) and ispal(prod(f))
print([k for k in range(2, 999) if ok(k)]) # Michael S. Branicky, Mar 06 2023
CROSSREFS
Cf. A002113 (palindromes), A008472, A007947.
Sequence in context: A167620 A169935 A193498 * A239087 A095227 A131366
KEYWORD
nonn,base
AUTHOR
Alexandru Petrescu, Mar 06 2023
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 April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)