login
Numbers in base 7.
(Formerly M0511)
198

%I M0511 #36 Aug 01 2024 01:16:08

%S 0,1,2,3,4,5,6,10,11,12,13,14,15,16,20,21,22,23,24,25,26,30,31,32,33,

%T 34,35,36,40,41,42,43,44,45,46,50,51,52,53,54,55,56,60,61,62,63,64,65,

%U 66,100,101,102,103,104,105,106,110,111,112,113,114,115,116,120

%N Numbers in base 7.

%D Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See p. 67.

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Nathaniel Johnston, <a href="/A007093/b007093.txt">Table of n, a(n) for n = 0..10000</a>

%H R. G. Wilson, V, <a href="/A007088/a007088.pdf">Letter to N. J. A. Sloane, Sep. 1992</a>

%H <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>.

%F a(0) = 0, a(n) = 10*a(n/7) if n==0 (mod 7), a(n) = a(n-1)+1 otherwise. - _Benoit Cloitre_, Dec 22 2002

%p A007093 := proc(n) local l: if(n=0)then return 0: fi: l:=convert(n,base,7): return op(convert(l,base,10,10^nops(l))): end: seq(A007093(n),n=0..63); # _Nathaniel Johnston_, May 06 2011

%t Table[ FromDigits[ IntegerDigits[n, 7]], {n, 0, 66}]

%o (PARI) a(n)=if(n<1,0,if(n%7,a(n-1)+1,10*a(n/7)))

%o (PARI) a(n) = fromdigits(digits(n, 7)); \\ _Michel Marcus_, Aug 12 2018

%Y Cf. A000042, A007088, A007089, A007090, A007091, A007092, A007094, A007095.

%K nonn,easy,base

%O 0,3

%A _N. J. A. Sloane_, _Robert G. Wilson v_