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 A048298 #82 Oct 10 2023 05:20:25 %S A048298 0,1,2,0,4,0,0,0,8,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32, %T A048298 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0, %U A048298 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 %N A048298 a(n) = n if n=2^i for i >= 0, otherwise a(n) = 0. %C A048298 Expand x/(x-1) = Sum_{n >= 0} 1/x^n as Sum a(n) / (1+x^n). %C A048298 Nim-binomial transform of the natural numbers. If {t(n)} is the Nim-binomial transform of {a(n)}, then t(n)=(S^n)a(0), where Sf(n) denotes the Nim-sum of f(n) and f(n+1); and S^n=S(S^(n-1)). - _John W. Layman_, Mar 06 2001 %H A048298 Reinhard Zumkeller, <a href="/A048298/b048298.txt">Table of n, a(n) for n = 0..10000</a> %H A048298 Jean-Paul Allouche and Jeffrey Shallit, <a href="http://webusers.imj-prg.fr/~jean-paul.allouche/kreg2.ps">The Ring of k-regular Sequences, II</a>. %H A048298 Jean-Paul Allouche and Jeffrey Shallit, <a href="http://dx.doi.org/10.1016/S0304-3975(03)00090-2">The ring of k-regular sequences, II</a>, Theoret. Computer Sci., 307 (2003), 3-29. %H A048298 Daniele A. Gewurz and Francesca Merola, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL6/Gewurz/gewurz5.html">Sequences realized as Parker vectors of oligomorphic permutation groups</a>, J. Integer Seqs., Vol. 6, 2003. %F A048298 Multiplicative with a(2^e)=2^e and a(p^e)=0 for p > 2. - _Vladeta Jovovic_, Jan 27 2002 %F A048298 Inverse mod 2 binomial transform of n. a(n) = sum{k=0..n, (-1)^A010060(n-k)*mod(C(n, k), 2)*k}. - _Paul Barry_, Jan 03 2005 %F A048298 If n=1 we have a(n)=1; if n=p is prime, then (-1)^(p+1)+a(p)=1, thus a(2)=2, and a(p)=0, if p>2. - _Vladimir Shevelev_, Jun 09 2009 %F A048298 Dirichlet g.f.: 2^s/(2^s-2). - _Ralf Stephan_, Jun 17 2007 %F A048298 Dirichlet g.f.: zeta(s)/eta(s). - _Ralf Stephan_, Mar 25 2015 %F A048298 For n>=1, we have a recursion Sum_{d|n}(-1)^(1+(n/d))a(d)=1. - _Vladimir Shevelev_, Jun 09 2009 %F A048298 For n>=1, there is the recurrence n=Sum_{k=1..n} a(k)*g(n/k) where g(x) = floor(x) - 2*floor(x/2). - _Benoit Cloitre_, Nov 11 2010 %F A048298 a(n) = A209229(n)*n. - _Reinhard Zumkeller_, Oct 17 2015 %F A048298 a(n) = n if 2^n mod n == 0 and a(n) = 0 otherwise. - _Chai Wah Wu_, Dec 01 2022 %p A048298 0, seq(op([2^n,0$(2^n-1)]), n=0..10); # _Robert Israel_, Mar 25 2015 %p A048298 a := n -> if n = 2^ilog2(n) then n else 0 fi: # _Peter Luschny_, Oct 03 2022 %t A048298 Table[n*Boole[Or[n == 1, First /@ FactorInteger@ n == {2}]], {n, 0, 120}] (* _Michael De Vlieger_, Mar 25 2015 *) %t A048298 a[n_] := If[n == 2^IntegerExponent[n, 2], n, 0]; Array[a, 100, 0] (* _Amiram Eldar_, Oct 10 2023 *) %o A048298 (PARI) a(n)=direuler(p=1,n,if(p==2,1/(1-2*X),1))[n] /* _Ralf Stephan_, Mar 27 2015 */ %o A048298 (PARI) a(n) = if(n == 0, 0, if(n == 1 << valuation(n, 2), n, 0)); \\ _Amiram Eldar_, Oct 10 2023 %o A048298 (Magma) [n eq 2^Valuation(n,2) select n else 0: n in [0..120]]; // _Vincenzo Librandi_, improved by _Bruno Berselli_, Mar 27 2015 %o A048298 (Haskell) %o A048298 a048298 n = a209229 n * n -- _Reinhard Zumkeller_, Oct 17 2015 %o A048298 (Python) %o A048298 def A048298(n): return n if n and not(n&-n)^n else 0 # _Chai Wah Wu_, Dec 01 2022 %Y A048298 A kind of inverse to A048272. Cf. A060147. %Y A048298 This is Guy Steele's sequence GS(5, 1) (see A135416). %Y A048298 Cf. A209229 (characteristic function of powers of 2). %K A048298 easy,nonn,mult %O A048298 0,3 %A A048298 _Adam Kertesz_ %E A048298 More terms from Keiko L. Noble (s1180624(AT)cedarville.edu)