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.

Previous Showing 11-20 of 71 results. Next

A159966 Lodumo_4 of A102370 (sloping binary numbers).

Original entry on oeis.org

0, 3, 2, 1, 4, 7, 6, 5, 8, 11, 10, 9, 12, 15, 14, 13, 16, 19, 18, 17, 20, 23, 22, 21, 24, 27, 26, 25, 28, 31, 30, 29, 32, 35, 34, 33, 36, 39, 38, 37, 40, 43, 42, 41, 44, 47, 46, 45, 48, 51, 50, 49, 52, 55, 54, 53, 56, 59, 58, 57, 60, 63, 62, 61, 64, 67, 66, 65, 68, 71, 70, 69, 72
Offset: 0

Views

Author

Philippe Deléham, Apr 28 2009

Keywords

Comments

A permutation of the nonnegative integers.
A092486 preceded by a zero. - Philippe Deléham, May 05 2009
Fixed points are the even numbers. - Wesley Ivan Hurt, Oct 16 2015

Crossrefs

Programs

  • Magma
    [n-(1-(-1)^n)*(-1)^((2*n+1-(-1)^n) div 4) : n in [0..100]]; // Wesley Ivan Hurt, Oct 16 2015
    
  • Maple
    A159966:=n->n-(1-(-1)^n)*(-1)^((2*n+1-(-1)^n)/4): seq(A159966(n), n=0..100); # Wesley Ivan Hurt, Oct 16 2015
  • Mathematica
    Table[n - (1 - (-1)^n) (-1)^((2 n + 1 - (-1)^n)/4), {n, 0, 40}] (* or *) CoefficientList[Series[(3 x - 4 x^2 + 3 x^3)/((x - 1)^2 (1 + x^2)), {x, 0, 100}], x] (* Wesley Ivan Hurt, Oct 16 2015 *)
    LinearRecurrence[{2,-2,2,-1},{0,3,2,1},80] (* Harvey P. Dale, Jul 02 2022 *)
  • PARI
    concat(0, Vec((3*x-4*x^2+3*x^3)/((x-1)^2*(1+x^2)) + O(x^100))) \\ Altug Alkan, Oct 17 2015

Formula

a(n) = lod_4 (A102370(n)).
From Wesley Ivan Hurt, Oct 16 2015: (Start)
G.f.: (3*x-4*x^2+3*x^3)/((x-1)^2*(1+x^2)).
a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4), n>3.
a(n) = n-(1-(-1)^n)*(-1)^((2*n+1-(-1)^n)/4).
a(2n) = A005843(n); a(2n+1) = A166549(n).
a(n+1) - a(n) = A132429(n)*(-1)^n. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = log(2) (A002162). - Amiram Eldar, Nov 28 2023

A159970 Lodumo_5 of A102370 (sloping binary numbers) .

Original entry on oeis.org

0, 3, 1, 5, 4, 10, 15, 9, 8, 6, 14, 13, 18, 23, 28, 2, 11, 19, 7, 16, 20, 21, 26, 25, 24, 12, 30, 31, 29, 34, 39, 33, 17, 35, 38, 22, 36, 27, 32, 41, 40, 43, 46, 45, 50, 55, 60, 44, 48, 51, 49, 53, 37, 58, 63, 42, 56, 54, 61, 68, 66, 71, 76, 65, 59, 47, 70, 64
Offset: 0

Views

Author

Philippe Deléham, Apr 28 2009

Keywords

Comments

Permutation of nonnegative integers .
The Lodumo_m transformation of a sequence s(n) is defined by a(n) = smallest nonnegative integer not yet in the list a(.) such that a(n)=s(n) (mod m). [From R. J. Mathar, Apr 30 2009]

Crossrefs

Extensions

Corrected by R. J. Mathar, Apr 30 2009

A103543 Consider those values of k for which A102370(k) = k: 0, 4, 8, 16, 20, 24, 32, 36, 40, 48, 52, 56, 64, ... and divide by 4: 0, 1, 2, 4, 5, 6, 8, 9, 10, 12, 13, 14, 16, 17, 18, 20, 21, 22, 24, ...; sequence gives missing numbers.

Original entry on oeis.org

3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 62, 63, 67, 71, 75, 79, 83, 87, 91, 95, 99, 103, 107, 111, 115, 119, 123, 126, 127, 131, 135, 139, 143, 147, 151, 155, 159, 163, 167, 171, 175, 179, 183, 187, 190, 191, 195, 199, 203, 207, 211, 215, 219, 223
Offset: 1

Views

Author

N. J. A. Sloane, Mar 23 2005

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, s = 0, l = Max[2, Floor[Log[2, n + 1] + 2]]}, While[k < l, If[ Mod[n + k, 2^k] == 0, s = s + 2^k]; k++ ]; s]; Complement[ Range[225], Select[ Range[900], f[ # ] == 0 &]/4] (* Robert G. Wilson v, Mar 23 2005 *)

Formula

Numbers of the form 4k+3 together with the terms of A103584.
It is shown in the reference that A102370(k) = k iff n == 0 (mod 4) and n does not belong to any of the arithmetic progressions Q_r := {2^(4r)*j - 4r, j >= 1} for r = 1, 2, 3, ...
In other words, the sequence consists of the numbers of the form j*2^(4k-2) - k for k >=2 and j >= 1.

Extensions

More terms from Robert G. Wilson v, Mar 23 2005

A103863 Hamming distance between n and A102370(n) (in binary).

Original entry on oeis.org

0, 1, 1, 2, 0, 2, 2, 3, 0, 1, 1, 2, 1, 3, 3, 4, 0, 1, 1, 2, 0, 2, 2, 3, 0, 1, 1, 3, 2, 4, 4, 5, 0, 1, 1, 2, 0, 2, 2, 3, 0, 1, 1, 2, 1, 3, 3, 4, 0, 1, 1, 2, 0, 2, 2, 3, 0, 1, 2, 4, 3, 5, 5, 6, 0, 1, 1, 2, 0, 2, 2, 3, 0, 1, 1, 2, 1, 3, 3, 4, 0, 1, 1, 2, 0, 2, 2, 3, 0, 1, 1, 3, 2, 4, 4, 5, 0, 1, 1, 2, 0, 2, 2, 3, 0
Offset: 0

Views

Author

Philippe Deléham, Mar 31 2005

Keywords

Comments

The Hamming distance between two strings of the same length is the number of places where they differ. - Robert G. Wilson v, Apr 12 2005

References

  • F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, Elsevier/North Holland, 1978, p. 8.

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, s = 0, l = Max[2, Floor[ Log[2, n + 1] + 2]]}, While[ k < l, If[ Mod[n + k, 2^k] == 0, s = s + 2^k]; k++ ]; s]; hammingdistance[n_] := Count[ IntegerDigits[ BitXor[n, f[n] + n], 2], 1]; Table[ hammingdistance[n], {n, 0, 104}] (* Robert G. Wilson v, Apr 12 2005 *)

Formula

a(A104235(n)) = 0.

Extensions

More terms from Robert G. Wilson v, Apr 12 2005

A103202 A102370 sorted.

Original entry on oeis.org

0, 3, 4, 5, 6, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 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
Offset: 1

Views

Author

Philippe Deléham, Mar 27 2005

Keywords

Crossrefs

Cf. A102370.
Numbers missing from A102371.

A103585 Consider numbers k such that (A102370(k)-k)/2 = 1; read them mod 4 to get the sequence.

Original entry on oeis.org

1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 3, 1, 3, 1, 3
Offset: 1

Views

Author

Keywords

Comments

Is there a self-contained construction of this two-valued sequence?
Sequence appears to have period 43. - Ralf Stephan, May 18 2007

Examples

			The numbers k are 1, 3, 7, 9, 11, 15, 17, 19, ...
		

Crossrefs

A103615 Number of zeros in A103542(n) (binary equivalent of A102370(n)).

Original entry on oeis.org

1, 0, 1, 1, 2, 0, 2, 2, 3, 1, 1, 1, 2, 1, 3, 3, 4, 2, 2, 2, 3, 0, 2, 2, 3, 1, 1, 1, 3, 2, 4, 4, 5, 3, 3, 3, 4, 1, 3, 3, 4, 2, 2, 2, 2, 1, 3, 3, 4, 2, 2, 2, 3, 0, 2, 2, 3, 1, 1, 2, 4, 3, 5, 5, 6, 4, 4, 4, 5, 2, 4, 4, 5, 3, 3, 3, 3, 2, 4, 4, 5, 3, 3, 3, 4, 1, 3, 3, 4, 2, 2, 1, 3, 2, 4, 4, 5, 3, 3, 3, 4, 1, 3, 3, 4
Offset: 0

Views

Author

Philippe Deléham, Mar 31 2005

Keywords

Examples

			The sequence has a natural decomposition into blocks (see the paper): 1; 0; 1, 1, 2; 0, 2, 2, 3, 1, 1, 1; 2, 1, 3, 3, 4, 2, 2, 2, 3, 0, 2, 2, 3, 1, 1; 1, 3, ...
		

Crossrefs

Programs

  • Maple
    A023416 := proc(n) local digs : digs := convert(n,base,2) : if nops(digs) = 0 then 1: else add(1-j,j=digs) : fi : end: ili := readline("b102370.txt") : while ili <> 0 do na := sscanf(ili,"%d %d") : na := A023416(op(2,na)) ; printf("%d, ",na) ; ili := readline("b102370.txt") : od: # R. J. Mathar, Aug 10 2007

Formula

a(n) = A023416(A102370(n)). - R. J. Mathar, Aug 10 2007

Extensions

More terms from R. J. Mathar, Aug 10 2007

A103813 Partial sums of A102370.

Original entry on oeis.org

0, 3, 9, 14, 18, 33, 43, 52, 60, 71, 85, 98, 126, 149, 167, 184, 200, 219, 241, 262, 282, 313, 339, 364, 388, 415, 445, 506, 550, 589, 623, 656, 688, 723, 761, 798, 834, 881, 923, 964, 1004, 1047, 1093, 1138, 1198, 1253, 1303, 1352, 1400, 1451, 1505, 1558, 1610, 1673
Offset: 0

Views

Author

N. J. A. Sloane and David Applegate, Apr 01 2005

Keywords

References

  • Hardy and Wright, Sect. 18.2, for definition of average order.

Crossrefs

Cf. A102370.

Programs

  • Mathematica
    Accumulate[f[n_] := Block[{k = 1, s = 0, l = Max[2, Floor[Log[2, n + 1] + 2]]}, While[k < l, If[ Mod[n + k, 2^k] == 0, s = s + 2^k]; k++ ]; s]; Table[ f[n] + n, {n, 0, 53}] ] (* James C. McMahon, Jan 21 2024 *)

Formula

The average order of A102370(n) is n + O(log n).

A104378 First differences of A102370.

Original entry on oeis.org

3, 3, -1, -1, 11, -5, -1, -1, 3, 3, -1, 15, -5, -5, -1, -1, 3, 3, -1, -1, 11, -5, -1, -1, 3, 3, 31, -17, -5, -5, -1, -1, 3, 3, -1, -1, 11, -5, -1, -1, 3, 3, -1, 15, -5, -5, -1, -1, 3, 3, -1, -1, 11, -5, -1, -1, 3, 67, -33, -17, -5, -5, -1, -1, 3, 3, -1, -1, 11, -5, -1, -1, 3, 3, -1, 15, -5, -5, -1, -1, 3, 3, -1, -1, 11, -5, -1, -1, 3, 3, 31, -17, -5, -5, -1, -1, 3, 3
Offset: 0

Views

Author

N. J. A. Sloane, Apr 18 2005

Keywords

Crossrefs

Cf. A102370.

A105023 a(n) = A102370(n) - n. Or, 2*A103185(n).

Original entry on oeis.org

0, 2, 4, 2, 0, 10, 4, 2, 0, 2, 4, 2, 16, 10, 4, 2, 0, 2, 4, 2, 0, 10, 4, 2, 0, 2, 4, 34, 16, 10, 4, 2, 0, 2, 4, 2, 0, 10, 4, 2, 0, 2, 4, 2, 16, 10, 4, 2, 0, 2, 4, 2, 0, 10, 4, 2, 0, 2, 68, 34, 16, 10, 4, 2, 0, 2, 4, 2, 0, 10, 4, 2, 0, 2, 4, 2, 16, 10, 4, 2, 0, 2, 4, 2, 0, 10, 4, 2, 0, 2, 4, 34, 16, 10, 4
Offset: 0

Views

Author

N. J. A. Sloane, Apr 03 2005

Keywords

Comments

When written in base 2 as a right justified table, columns have periods 1, 2, 4, 8, ... - Philippe Deléham, Apr 21 2005

Examples

			Has a natural decomposition into blocks: 0; 2; 4, 2, 0; 10, 4, 2, 0, 2, 4, 2; 16, 10, 4, 2, 0, 2, 4, 2, 0, 10, 4, 2, 0, 2, 4; 34, 16, 10, 4, ... where the leading term in each block is given by A105024.
		

Crossrefs

Programs

  • Maple
    s:= proc (n) local t1, l; t1 := 0; for l to n do if `mod`(n+l,2^l) = 0 then t1 := t1+2^l end if end do; t1 end proc;

Formula

a(n) = Sum_{ k >= 1 such that n + k == 0 mod 2^k } 2^k.
Previous Showing 11-20 of 71 results. Next