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!)
A356978 a(n) is the first number k such that k^i is a quasi-Niven number (A209871) for 1<=i<=n but not for i=n+1. 0
13, 11, 1145, 121, 31109, 1510081, 34110497, 5343853441, 17636269729 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(n) is the first number k such that the remainder on division of k^i by its sum of digits is 1 for 1<=i<=n but not i=n+1.
LINKS
EXAMPLE
a(4) = 121 because 121, 121^2 = 14641, 121^3 = 1771561, 121^4 = 214358881, and 121^5 = 25937424601 have sums of digits 4, 16, 28, 40, and 43 respectively, and 121 mod 4 = 1, 121^2 mod 16 = 1, 121^3 mod 28 = 1, 121^4 mod 40 = 1, but 121^4 mod 43 = 41 <> 1, and 121 is the first number that works.
MAPLE
sd:= n -> convert(convert(n, base, 10), `+`):
f:= proc(n) local d;
for d from 1 do
if n^d mod sd(n^d) <> 1 then return d-1 fi
od
end proc:
V:= Vector(6): count:= 0:
for n from 1 while count < 6 do
v:= f(n);
if v > 0 and V[v] = 0 then
count:= count+1; V[v]:= n
fi
od:
convert(V, list);
MATHEMATICA
quasiNivenQ[n_] := (s = Plus @@ IntegerDigits[n]) > 1 && Divisible[n - 1, s]; f[k_] := Module[{i = 0, m = k}, While[quasiNivenQ[m], m *= k; i++]; i]; seq[len_, nmax_] := Module[{s = Table[0, {len}], n = 2, c = 0, i}, While[c < len && n < nmax, i = f[n]; If[0 < i <= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[6, 10^7] (* Amiram Eldar, Sep 07 2022 *)
CROSSREFS
Sequence in context: A298893 A083229 A140554 * A022969 A023455 A055124
KEYWORD
nonn,base,more
AUTHOR
Robert Israel, Sep 07 2022
EXTENSIONS
a(7) from Amiram Eldar, Sep 07 2022
a(8) and a(9) from Giorgos Kalogeropoulos, Sep 09 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 July 21 15:14 EDT 2024. Contains 374474 sequences. (Running on oeis4.)