A132347
Concatenation of first n members of the Padovan sequence A000931.
Original entry on oeis.org
1, 10, 100, 1001, 10010, 100101, 1001011, 10010111, 100101112, 1001011122, 10010111223, 100101112234, 1001011122345, 10010111223457, 100101112234579, 10010111223457912, 1001011122345791216, 100101112234579121621
Offset: 1
-
Module[{nn=20,padseq},padseq=LinearRecurrence[{0,1,1},{1,0,0},nn];Table[FromDigits[ Flatten[ IntegerDigits/@Take[padseq,n]]],{n,nn}]] (* Harvey P. Dale, Feb 18 2024 *)
A166747
Numbers with n digits from the set {1,2,4}, requiring a nondecreasing sequence of digits and a digits sum of A008578(n).
Original entry on oeis.org
1, 11, 111, 1112, 11122, 122222, 1222222, 12222224, 122222224, 1222222244, 12222224444, 122222224444, 1222222444444, 12222224444444, 122222224444444, 1222222244444444, 12222224444444444, 122222444444444444, 1222222444444444444, 12222244444444444444
Offset: 1
-
A008578 := proc(n) if n = 1 then 1; else ithprime(n-1) ; fi; end:
A166747 := proc(n) local p,n1,n2,n4,i ; p := A008578(n) ; for n4 from 0 to n do n2 := p-n-3*n4 ; n1 := n-n2-n4 ; if n2 >= 0 and n1 >= 0 then a := 0 ; for i from 1 to n1 do a := 10*a+1 ; od: for i from 1 to n2 do a := 10*a+2 ; od: for i from 1 to n4 do a := 10*a+4 ; od: return a ; end if: end do: end:
seq(A166747(n),n=1..20) ; # R. J. Mathar, Oct 25 2009
Showing 1-2 of 2 results.
Comments