A188916 Where squares occur in the union of squares and powers of 2.
0, 1, 3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100
Offset: 0
Keywords
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
Programs
-
Haskell
a188916 n = a188916_list !! n a188916_list = filter ((== 1) . a010052. a188915) [0..] -- Reinhard Zumkeller, May 19 2015
-
Mathematica
seq[lim_] := -1 + Position[Union[2^Range[1, Floor[Log2[lim]], 2], Range[0, Floor[Sqrt[lim]]]^2], ?(IntegerQ[Sqrt[#]] &)] // Flatten; seq[10000] (* _Amiram Eldar, Apr 13 2025 *)