login
A342826
Numbers k such that d(1)^0 + d(2)^1 + ... + d(p)^(p-1) = d(1)^(p-1) + d(2)^(p-2) + ... + d(p)^0, where d(i), i=1..p, are the digits of k.
3
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 121, 131, 141, 151, 161, 171, 181, 191, 202, 212, 222, 232, 242, 252, 262, 272, 282, 292, 303, 313, 323, 333, 343, 353, 363, 373, 383, 393, 404, 414, 424, 434, 444, 454, 464
OFFSET
1,2
COMMENTS
This sequence starts off like other palindromic sequences such as A178354, A002113, A110751, and A227858 but it differs starting at the 110th term: 109th: 1001, 110th: 1011, 111th: 1101, ..., 119th: 1863, etc.
Differs from A297271 (which e.g. has 1021, 1031, 1041,.. 1091 which are absent here). - R. J. Mathar, Sep 27 2021
Contains the palindromes, and palindromes where pairs of digits have been substituted by d(i)=0, d(p-i)=1 or d(i)=1, d(p-1)=0, and "genuine" numbers like 1863, 2450, 2804, 2814, 3681, 4081, 4182, 103221, 113221, 122301, 122311, 142023,.. - R. J. Mathar, Sep 27 2021
LINKS
R. J. Mathar, Table of n, a(n) for n = 1..1137 (replacing older b-file which did not contain a(101))
EXAMPLE
1863 is in this sequence because 1^0 + 8^1 + 6^2 + 3^3 = 1^3 + 8^2 + 6^1 + 3^0 = 72.
MAPLE
isA342826 := proc(n)
local dgs ;
dgs := convert(n, base, 10) ;
if add(op(i, dgs)^(i-1), i=1..nops(dgs)) = add(op(-i, dgs)^(i-1), i=1..nops(dgs)) then
true;
else
false;
end if;
end proc:
A342826 := proc(n)
option remember ;
if n =1 then
1;
else
for a from procname(n-1)+ 1 do
if isA342826(a) then
return a;
end if;
end do:
end if;
end proc: # R. J. Mathar, Sep 27 2021
MATHEMATICA
Select[Range[500], Mod[#, 10]!=0&&Total[IntegerDigits[#]^Range[0, IntegerLength[ #]-1]]==Total[IntegerDigits[#]^Range[IntegerLength[#]-1, 0, -1]]&] (* Harvey P. Dale, Jan 18 2023 *)
PROG
(Python)
def digpow(s): return sum(int(d)**i for i, d in enumerate(s))
def aupto(limit):
alst = []
for k in range(1, limit+1):
s = str(k)
if digpow(s) == digpow(s[::-1]): alst.append(k)
return alst
print(aupto(464)) # Michael S. Branicky, Mar 23 2021
CROSSREFS
Cf. A002113 (subset), A179309, A110751, A227858.
Sequence in context: A043713 A296712 A276115 * A266140 A297271 A110751
KEYWORD
nonn,base
AUTHOR
Carole Dubois, Mar 23 2021
STATUS
approved