|
|
A371260
|
|
a(n) is the first of three consecutive Harshad numbers in arithmetic progression.
|
|
1
|
|
|
1, 2, 3, 4, 5, 6, 7, 8, 21, 24, 42, 110, 114, 120, 162, 192, 201, 220, 320, 330, 342, 372, 510, 511, 522, 552, 700, 774, 912, 954, 960, 1010, 1014, 1015, 1020, 1050, 1088, 1092, 1101, 1104, 1122, 1242, 1270, 1300, 1410, 1422, 1458, 1526, 1584, 1590, 1602, 1632
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
The three consecutive Harshad numbers starting at 8 (8, 9, 10) are in arithmetic progression.
The same is true of the three consecutive Harshad numbers starting at 21 (21, 24, 27).
|
|
MATHEMATICA
|
Select[Partition[Select[Range[2000], Divisible[#, DigitSum[#]] &], 3, 1], Equal @@ Differences[#] &][[;; , 1]] (* Amiram Eldar, Mar 17 2024 *)
|
|
PROG
|
(Python)
from itertools import count, islice
def agen(): # generator of terms
h1, h2, h3 = 1, 2, 3
while True:
if h3 - h2 == h2 - h1: yield h1
h1, h2, h3 = h2, h3, next(k for k in count(h3+1) if k%sum(map(int, str(k))) == 0)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|