cp's OEIS Frontend

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.

A048730 Differences between A008589 (multiples of 7) and A048727, a(n) = ((n*7)-Xmult(n,7)).

This page as a plain text file.
%I A048730 #21 Aug 07 2025 06:18:08
%S A048730 0,0,0,12,0,8,24,28,0,0,16,28,48,56,56,60,0,0,0,12,32,40,56,60,96,96,
%T A048730 112,124,112,120,120,124,0,0,0,12,0,8,24,28,64,64,80,92,112,120,120,
%U A048730 124,192,192,192,204,224,232,248
%N A048730 Differences between A008589 (multiples of 7) and A048727, a(n) = ((n*7)-Xmult(n,7)).
%C A048730 For n = binary n[k],n[k-1],...,n[0], bits a(n) = binary b[k+1],b[k],...,b[0] are b[i] = 1 when n[i-1] + n[i-2] + n[i-3] >= 2, so the majority bit 0 or 1 among the 3 bits of n below position i (with 0 bits below the radix point of n as necessary).  This is since 7*n = 4*n + 2*n + n is n[i-1] + n[i-2] + n[i-3] at position i-1, and 4*n XOR 2*n XOR n is the same but no carry, so b[i] is the carry only. - _Kevin Ryde_, Mar 26 2021
%H A048730 Paolo Xausa, <a href="/A048730/b048730.txt">Table of n, a(n) for n = 0..8191</a>
%t A048730 A048730[n_] := 7*n - BitXor[n, 2*n, 4*n];
%t A048730 Array[A048730,100, 0] (* _Paolo Xausa_, Aug 06 2025 *)
%o A048730 (PARI) a(n)=7*n - bitxor(n, bitxor(2*n, 4*n)) \\ _Charles R Greathouse IV_, Oct 03 2016
%o A048730 (Python)
%o A048730 def A048730(n): return 7*n-(n^n<<1^n<<2) # _Chai Wah Wu_, Jun 29 2022
%Y A048730 Positions of zeros are given by A048715. Cf. A048733, A342697.
%Y A048730 Diagonal 7 of A061858.
%K A048730 nonn,easy,look
%O A048730 0,4
%A A048730 _Antti Karttunen_, Apr 26 1999