OFFSET
1,1
COMMENTS
a(10*n) = 10*a(n).
The sequence is a permutation of the positive multiples of 7. - Vladimir Shevelev, May 24 2015
A258329(n) = a(n) / 7 is a permutation of the positive integers. - Reinhard Zumkeller, May 27 2015
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..9999
MATHEMATICA
a[n_] := a[n] = For[k = 7, True, k = k + 7, If[Divisible[k - n, 10^IntegerLength[n]] && FreeQ[Array[a, n-1], k], Return[k]]]; Array[a, 54] (* Jean-François Alcover, Feb 07 2018 *)
PROG
(Haskell)
import Data.List (isPrefixOf, delete)
a258188 n = a258188_list !! (n-1)
a258188_list = f 1 $ tail $ zip
a008589_list $ map (reverse . show) a008589_list where
f x ws = g ws where
g ((u, vs) : uvs) = if isPrefixOf xs vs
then u : f (x + 1) (delete (u, vs) ws) else g uvs
xs = reverse $ show x
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric Angelini and Reinhard Zumkeller, May 23 2015
STATUS
approved