A308496 Numbers with digits 1,2,4,7 when written in base 8.
1, 2, 4, 7, 9, 10, 12, 15, 17, 18, 20, 23, 33, 34, 36, 39, 57, 58, 60, 63, 73, 74, 76, 79, 81, 82, 84, 87, 97, 98, 100, 103, 121, 122, 124, 127, 137, 138, 140, 143, 145, 146, 148, 151, 161, 162, 164, 167, 185, 186, 188, 191, 265, 266, 268, 271, 273
Offset: 1
Links
- Creighton Dement, Table of n, a(n) for n = 1..10000
- Creighton Dement, Floretions and Actions of D3 (DRAFT)
- Stefan Rakonjac, The Sounds of Sequences: Floretions
Programs
-
Mathematica
A308496Q[n_]:=ContainsOnly[IntegerDigits[n,8],{1,2,4,7}]; Select[Range[1000],A308496Q] (* Paolo Xausa, Dec 31 2023 *)
-
PARI
is(n)=!#setminus(Set(digits(n,8)),[1,2,4,7]); a(n) = { local(total_count, index); until(total_count == n+1, if(is(index)==1, total_count++); index++); index-1; }
-
PARI
a(n,b=8,d=[1,2,4,7]) = { for (w=1, oo, if (n>#d^w, n-=#d^w, return (fromdigits(apply(x -> d[1+x], digits(#d^w+n-1, #d))[2..-1],b)))) } \\ Rémy Sigrist, Jun 01 2019
Comments