cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A237851 a(1)=1; a(n) is the smallest integer not yet in the sequence divisible by all nonzero digits of a(n-1).

This page as a plain text file.
%I A237851 #25 Nov 26 2019 08:34:36
%S A237851 1,2,4,8,16,6,12,10,3,9,18,24,20,14,28,32,30,15,5,25,40,36,42,44,48,
%T A237851 56,60,54,80,64,72,70,7,21,22,26,66,78,112,34,84,88,96,90,27,98,144,
%U A237851 52,50,35,45,100,11,13,33,39,63,102,38,120,46,108,104,68,168
%N A237851 a(1)=1; a(n) is the smallest integer not yet in the sequence divisible by all nonzero digits of a(n-1).
%C A237851 A permutation of the naturals with inverse A237860.
%C A237851 If a(n) is a prime greater than 7 then no digit of a(n-1) is greater than 1, cf. A007088.
%H A237851 Lars Blomberg and Reinhard Zumkeller, <a href="/A237851/b237851.txt">Table of n, a(n) for n = 1..10000</a>
%H A237851 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%t A237851 a[1] = 1;
%t A237851 a[n_] := a[n] = For[k = 1, True, k++, If[FreeQ[Array[a, n-1], k], If[ AllTrue[Select[IntegerDigits[a[n-1]], #>0&] // Union, Divisible[k, #]&], Return[k]]]];
%t A237851 a /@ Range[100] (* _Jean-François Alcover_, Nov 26 2019 *)
%o A237851 (Haskell)
%o A237851 import Data.List (nub, sort, delete)
%o A237851 a237851 n = a237851_list !! (n-1)
%o A237851 a237851_list = 1 : f 1 [2..] where
%o A237851    f x zs = g zs where
%o A237851      g (u:us) | all ((== 0) . (mod u)) ds = u : f u (delete u zs)
%o A237851               | otherwise = g us
%o A237851               where ds = dropWhile (<= 1) $
%o A237851                          sort $ nub $ map (read . return) $ show x
%o A237851 -- _Reinhard Zumkeller_, Feb 14 2014
%Y A237851 Cf. A002796, A180410, A002473, A237860, A007088.
%K A237851 nonn,base,nice,look
%O A237851 1,2
%A A237851 _Eric Angelini_, Feb 14 2014