A054517 Duplicate of A054016.
1, 2, 4, 8, 16, 31, 32, 64, 103, 128, 171, 213, 256, 301, 342, 439, 475, 494, 512, 558
Offset: 1
This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
Clear[a]; a[1] = 1; a[n_] := a[n] = (xor = BitXor @@@ Subsets[Array[a, n-1], 3] // Union ; r = Range[0, m = Last[xor]]; cp = Complement[r, xor]; If[cp == {}, m+1, First[cp]]); Table[a[n], {n, 1, 43}] (* Jean-François Alcover, Jan 09 2013 *)
#include#include void sieve(){ const int first = 2; const int max = 10000; bool member[max]; for(int i = first; i < max; ++i){ member[i] = true; } for(int i = first; i < max; ++i){ if(member[i]){ for(int x = i + i; x < max; x += i){ member[x] = false; } for(int j = first; j < i; ++j){ if(member[j] && i + j < max){ member[i + j] = false; } } } } int num = 0; for(int i = first; i < max; ++i){ if(member[i]){ printf("%i, ", i); num += 1; } } printf(" num = %i ", num); }
s={2};Do[m=2;Until[Total[Boole[Divisible[m,s]]]==0&&!MemberQ[Total/@Subsets[s,{2}],m],m++];AppendTo[s,m],{n,50}];s (* James C. McMahon, Jul 09 2025 *)
Comments