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.
%I A376448 #25 Oct 20 2024 12:47:23 %S A376448 1,3,7,13,25,51,103,207,415,829,1657,3313,6627,13255,26509,53019, %T A376448 106039,212079,424157,848315,1696631,3393263,6786527,13573053, %U A376448 27146105,54292211,108584423,217168845,434337691,868675383,1737350767,3474701533,6949403065,13898806131,27797612261,55595224523 %N A376448 a(n) = k if k is odd otherwise a(n) = k+1 and k = floor( 2^n*(1+sqrt(5))/2 ). %C A376448 The sequence of all multiples of an irrational b is equidistributed modulo 1. Such a sequence is called a Weyl sequence. It is common practice in computing to approximate a Weyl sequence by taking integer multiples of some integer m modulo a power of two. This requires that the integer m is odd. This sequence provides suitable m = a(n) for the case modulo 2^n. It utilizes the golden ratio for approximation of irrationality. %F A376448 a(n) = 2*A293313(n-1) + 1, for n > 0. %e A376448 An example for a pseudo Weyl sequence obtained from a(3): %e A376448 {0, 1, 2, 3, 4, 5, 6, 7} * a(3) mod 2^3 = {0, 5, 2, 7, 4, 1, 6, 3}. (Without zero also part of A194868). %t A376448 k[n_]:=Floor[2^n*GoldenRatio];Table[If[OddQ[k[n]],k[n],k[n]+1],{n,0,35}] (* _James C. McMahon_, Oct 20 2024 *) %o A376448 (PARI) a(n) = {my( m=floor(quadgen(5)<<n) ); if(m%2==0, return(m+1), return(m))} %Y A376448 Cf. A054065, A194868, A293313, A293314, A293315. %K A376448 nonn,easy %O A376448 0,2 %A A376448 _Thomas Scheuerle_, Sep 23 2024