OFFSET
1,2
COMMENTS
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
EXAMPLE
Regarding 30232:
- the first digit 3 is 3 positions away from the second digit 3 and vice versa,
- the digit 0 matches itself,
- the first digit 2 is 2 positions away from the second digit 2 and vice versa,
- so 30232 belongs to this sequence.
PROG
(PARI) is(n, base=10) = { my (d=digits(n, base)); for (k=1, #d, if ((k-d[k]<1 || d[k-d[k]]!=d[k]) && (k+d[k]>#d || d[k+d[k]]!=d[k]), return (0)));
return (1) }
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Aug 06 2020
STATUS
approved