[go: up one dir, main page]

login
A152183
The sequence is a lattice filling using the Golden Ratio, (Sqrt[5]+1)/2, constant digits base ten.
0
1, 23, 769, 5817, 93907, 1154762
OFFSET
0,2
COMMENTS
A new faster Program is used in Mathematica.
MATHEMATICA
Clear[ f ]; f[ 0 ] := 1; f[ n_Integer /; n > 0 ] := Module[ {i, cnt, m, p}, i = 0; cnt = 0; m = Table[ 0, {10^n} ]; p = Map[ FromDigits, Partition[ First[ RealDigits[ GoldenRatio, 10, 20*10^n ] ], n, 1 ] ] + 1; Catch[ Map[ ( i++; If[ m[ [ # ] ] == 0, m[ [ # ] ] = 1; If[ ++cnt == 10^n, Throw[ i ] ] ]) &, p ] ] ]; Table[ f[ n ], {n, 0, 4} ]
CROSSREFS
Sequence in context: A159306 A236302 A179793 * A027410 A158505 A217116
KEYWORD
nonn,uned,base
AUTHOR
Roger L. Bagula, Nov 28 2008, Nov 30 2008
STATUS
approved