OFFSET
2,1
COMMENTS
LINKS
Michel Marcus, Table of n, a(n) for n = 2..3000
Daniel Tsai, A recurring pattern in natural numbers of a certain property, arXiv:2010.03151 [math.NT], 2020.
Daniel Tsai, A recurring pattern in natural numbers of a certain property, Integers (2021) Vol. 21, Article #A32.
Daniel Tsai, v-palindromes: an analogy to the palindromes, arXiv:2111.10211 [math.HO], 2021. See Table 1 p. 9.
EXAMPLE
a(10) = A338039(1) = 18.
MATHEMATICA
s[1] = 0; s[n_] := Plus @@ First /@ (f = FactorInteger[n]) + Plus @@ Select[Last /@ f, # > 1 &]; a[b_] := Module[{k = b+1, r}, While[!(!Divisible[k, b] && k != (r = IntegerReverse[k, b]) && s[k] == s[IntegerReverse[k, b]]), k++]; k]; Array[a, 100, 2] (* Amiram Eldar, Nov 24 2021 *)
PROG
(PARI) f(n) = my(f=factor(n)); vecsum(f[, 1]) + sum(k=1, #f~, if (f[k, 2]!=1, f[k, 2])); \\ A338038
isok(m, b) = my(r=fromdigits(Vecrev(digits(m, b)), b)); (m % b) && (m != r) && (f(r) == f(m));
a(n) = my(k=1); while (!isok(k, n), k++); k;
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Michel Marcus, Nov 24 2021
STATUS
approved