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 21-30 of 32 results. Next

A106837 Numbers m such that both m and m+1 have odd part of the form 4*k+3.

Original entry on oeis.org

6, 11, 14, 22, 23, 27, 30, 38, 43, 46, 47, 54, 55, 59, 62, 70, 75, 78, 86, 87, 91, 94, 95, 102, 107, 110, 111, 118, 119, 123, 126, 134, 139, 142, 150, 151, 155, 158, 166, 171, 174, 175, 182, 183, 187, 190, 191, 198, 203, 206, 214, 215, 219, 222, 223, 230
Offset: 1

Views

Author

Ralf Stephan, May 03 2005

Keywords

Comments

The asymptotic density of this sequence is 1/4. - Amiram Eldar, Sep 14 2024

Examples

			30/2 = 15 == 3 (mod 4) and also 31 == 3 (mod 4), therefore 30 is in the sequence.
		

Crossrefs

Contains A106838 and A106838+1.

Programs

  • Mathematica
    SequencePosition[Table[If[EvenQ[n],Mod[n/2^IntegerExponent[n,2],4], Mod[ n,4]],{n,250}],{3,3}][[All,1]] (* Requires Mathematica version 10 or later *)  (* Harvey P. Dale, Nov 20 2016 *)

A269366 a(1) = 1, a(2n) = A269361(1+a(n)), a(2n+1) = A269363(a(n)).

Original entry on oeis.org

1, 2, 3, 4, 6, 5, 7, 8, 12, 16, 15, 9, 11, 10, 22, 13, 24, 18, 38, 40, 48, 33, 46, 20, 14, 32, 27, 17, 19, 25, 44, 29, 28, 50, 75, 21, 30, 72, 71, 73, 70, 133, 139, 113, 76, 129, 91, 42, 35, 36, 23, 37, 54, 45, 51, 26, 43, 49, 39, 82, 62, 128, 107, 80, 56, 53, 83, 114, 140, 109, 214, 52, 59, 34, 47, 149, 150, 141, 123, 221, 111, 121
Offset: 1

Views

Author

Antti Karttunen, Feb 25 2016

Keywords

Comments

This sequence can be represented as a binary tree. Each left hand child is produced as A269361(1+n), and each right hand child as A269363(n), when the parent node contains n:
|
...................1...................
2 3
4......../ \........6 5......../ \........7
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
8 12 16 15 9 11 10 22
13 24 18 38 40 48 33 46 20 14 32 27 17 19 25 44
etc.
An example of (suspected) "entanglement permutation" where the other pair of complementary sequences is generated by a greedy algorithm.
Sequence is not only injective, but also surjective on N (thus a permutation of natural numbers) provided that A269361 is surjective on A091072 and A269363 is surjective on A091067.

Crossrefs

Left inverse: A269365 (also right inverse, if this sequence is a permutation of natural numbers).

A069562 Numbers, m, whose odd part (largest odd divisor, A000265(m)) is a nontrivial square.

Original entry on oeis.org

9, 18, 25, 36, 49, 50, 72, 81, 98, 100, 121, 144, 162, 169, 196, 200, 225, 242, 288, 289, 324, 338, 361, 392, 400, 441, 450, 484, 529, 576, 578, 625, 648, 676, 722, 729, 784, 800, 841, 882, 900, 961, 968, 1058, 1089, 1152, 1156, 1225, 1250, 1296, 1352, 1369
Offset: 1

Views

Author

Benoit Cloitre, Apr 18 2002

Keywords

Comments

Previous name: sum(d|n,6d/(2+mu(d))) is odd, where mu(.) is the Moebius function, A008683.
From Peter Munn, Jul 06 2020: (Start)
Numbers that have an odd number of odd nonsquarefree divisors.
[Proof of equivalence to the name, where m denotes a positive integer:
(1) These properties are equivalent: (a) m has an even number of odd squarefree divisors; (b) m has a nontrivial odd part.
(2) These properties are equivalent: (a) m has an odd number of odd divisors; (b) the odd part of m is square.
(3) m satisfies the condition at the start of this comment if and only if (1)(a) and (2)(a) are both true or both false.
(4) The trivial odd part, 1, is a square, so (1)(b) and (2)(b) cannot both be false, which (from (1), (2)) means (1)(a) and (2)(a) cannot both be false.
(5) From (3), (4), m satisfies the condition at the start of this comment if and only if (1)(a) and (2)(a) are true.
(6) m satisfies the condition in the name if and only if (1)(b) and (2)(b) are true, which (from (1), (2)) is equivalent to (1)(a) and (2)(a) being true, and hence from (5), to m satisfying the condition at the start of this comment.]
(End)
Numbers whose sum of non-unitary divisors (A048146) is odd. - Amiram Eldar, Sep 16 2024

Examples

			To determine the odd part of 18, remove all factors of 2, leaving 9. 9 is a nontrivial square, so 18 is in the sequence. - _Peter Munn_, Jul 06 2020
		

Crossrefs

A000265, A008683 are used in definitions of this sequence.
Lists of numbers whose odd part satisfies other conditions: A028982 (square), A028983 (nonsquare), A029747 (less than 6), A029750 (less than 8), A036349 (even number of prime factors), A038550 (prime), A070776 U {1} (power of a prime), A072502 (square of a prime), A091067 (has form 4k+3), A091072 (has form 4k+1), A093641 (noncomposite), A105441 (composite), A116451 (greater than 4), A116882 (less than or equal to even part), A116883 (greater than or equal to even part), A122132 (squarefree), A229829 (7-rough), A236206 (11-rough), A260488\{0} (has form 6k+1), A325359 (proper prime power), A335657 (odd number of prime factors), A336101 (prime power).

Programs

  • Mathematica
    Select[Range[1000], (odd = #/2^IntegerExponent[#, 2]) > 1 && IntegerQ @ Sqrt[odd] &] (* Amiram Eldar, Sep 29 2020 *)
  • PARI
    upto(n) = { my(res = List()); forstep(i = 3, sqrtint(n), 2, for(j = 0, logint(n\i^2, 2), listput(res, i^2<David A. Corneth, Sep 28 2020

Formula

Sum_{n>=1} 1/a(n) = 2 * Sum_{k>=1} 1/(2*k+1)^2 = Pi^2/4 - 2 = A091476 - 2 = 0.467401... - Amiram Eldar, Feb 18 2021

Extensions

New name from Peter Munn, Jul 06 2020

A119972 a(n) = n * A034947(n).

Original entry on oeis.org

1, 2, -3, 4, 5, -6, -7, 8, 9, 10, -11, -12, 13, -14, -15, 16, 17, 18, -19, 20, 21, -22, -23, -24, 25, 26, -27, -28, 29, -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, -62, -63, 64, 65, 66, -67, 68, 69, -70, -71, 72, 73, 74, -75
Offset: 1

Views

Author

Alford Arnold, Jun 01 2006

Keywords

Comments

Previous name was: Flag n when the first difference of the decimal encoding of the Gray code is negative. (With "flag" meaning negate n when the difference is negative.)
Merge A091072 with minus A091067 maintaining increasing absolute value.

Examples

			A003188 begins 0  1  3  2  6  7  5  4 12  13  15  14  10  11  9 ... so
A055975 begins   1  2 -1  4  1 -2 -1  8  1   2  -1  -4   1  -2  ...
Sequence         1, 2,-3, 4, 5,-6,-7, 8, 9, 10,-11,-12, 13,-14, ...
Negative terms are at positions 3,6,7,11,12,14,..., = A091067.
Positive terms are the complement, which is A091072.
		

Crossrefs

Programs

  • Maple
    isA091067 := proc(n) option remember ; if n mod 4 = 3 then RETURN(true) ; else if n mod 2 = 0 then if isA091067(n/2) then RETURN(true) ; fi ; fi ; RETURN(false) ; fi ; end: A119972 := proc(n) if isA091067(n) then -n ; else n ; fi ; end: for n from 1 to 180 do printf("%d, ",A119972(n)) ; od ; # R. J. Mathar, May 14 2007
    # second Maple program:
    a:= n-> numtheory[jacobi](-1, n)*n:
    seq(a(n), n=1..75);  # Alois P. Heinz, Jan 19 2023
  • Mathematica
    a[n_] := n KroneckerSymbol[-1, n];
    Array[a, 75] (* Jean-François Alcover, Apr 09 2020 *)
  • PARI
    a(n) = n*kronecker(-1, n); \\ Andrew Howroyd, Aug 06 2018

Formula

a(n) = n*Kronecker(-1, n) = n * A034947(n). - Andrew Howroyd, Aug 06 2018

Extensions

More terms from R. J. Mathar, May 14 2007
Keyword:mult added by Andrew Howroyd, Aug 06 2018
New name using existing formula from Joerg Arndt, Jan 19 2023

A164677 For a binary reflected Gray code, the (Hamming/Euclidean) distance between 2 subsequent points x and y is 1, say in coordinate k. If y has a 1 in coordinate k and x has a 0, than (x,y) is indicated by k, if it is the other way around, (x,y) is indicated by -k. The sequence has a fractal character such that G(d+1) = G(d) d+1 R(G(d)) where R(G(d)) alters d --> -d and leaves all other numbers invariant.

Original entry on oeis.org

1, 2, -1, 3, 1, -2, -1, 4, 1, 2, -1, -3, 1, -2, -1, 5, 1, 2, -1, 3, 1, -2, -1, -4, 1, 2, -1, -3, 1, -2, -1, 6, 1, 2, -1, 3, 1, -2, -1, 4, 1, 2, -1, -3, 1, -2, -1, -5, 1, 2, -1, 3, 1, -2, -1, -4, 1, 2, -1, -3, 1, -2, -1, 7, 1, 2, -1, 3, 1, -2, -1, 4, 1, 2, -1, -3, 1, -2, -1, 5
Offset: 1

Views

Author

Arie Bos, Aug 20 2009

Keywords

Comments

This is the paper-folding sequence Fold(1,2,3,4,5,...). It is also the fixed point of the map 1->1,2; 2->-1,3; 3->-1,4; 4->-1,5; ...; -1->1,-2; -2->-1,-3; -3->-1,-4; -4->-1,-5; ... [Allouche and Shallit]. - N. J. A. Sloane, Jul 27 2012
Multiplicative because both A034947 and A001511 are. - Andrew Howroyd, Aug 06 2018

References

  • Jean-Paul Allouche and Jeffrey Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 203, Exercise 15.

Crossrefs

Absolute values give A001511.
Indices of negative terms are listed in A091067. - M. F. Hasler, Aug 06 2015
Cf. A034947.

Programs

  • Mathematica
    a[n_] := KroneckerSymbol[-1, n] * IntegerExponent[2n, 2];
    Array[a, 80] (* Jean-François Alcover, Sep 08 2019 *)
  • PARI
    A164677(n)=(valuation(n,2)+1)*if(n>>valuation(n,2)%4==3,-1,1) \\ M. F. Hasler, Aug 06 2015

Formula

a(n) = (-1)^chi_A091067(n)*A001511(n), where chi_A091067 is the characteristic function of A091067. - M. F. Hasler, Aug 06 2015
a(n) = A034947(n)*A001511(n). - Andrew Howroyd, Aug 06 2018
Multiplicative with a(2^e) = e+1, and a(p^e) = (-1)^(e*(p-1)/2) for an odd prime p. - Amiram Eldar, Jun 09 2025

Extensions

More terms from Alois P. Heinz, Jan 30 2012

A246590 Even numbers whose odd part is of the form 4m+3; Numbers missing from A241816.

Original entry on oeis.org

6, 12, 14, 22, 24, 28, 30, 38, 44, 46, 48, 54, 56, 60, 62, 70, 76, 78, 86, 88, 92, 94, 96, 102, 108, 110, 112, 118, 120, 124, 126, 134, 140, 142, 150, 152, 156, 158, 166, 172, 174, 176, 182, 184, 188, 190, 192, 198, 204, 206, 214, 216, 220, 222, 224, 230, 236
Offset: 1

Views

Author

N. J. A. Sloane, Sep 03 2014

Keywords

Comments

Numbers with bit-0 in their binary representation zero, and whose least significant 1-bit is neighbored (to the left) by another 1-bit, in other words, all even terms of A091067. - Antti Karttunen, Feb 20 2015
The asymptotic density of this sequence is 1/4. - Amiram Eldar, Aug 31 2024

Crossrefs

Complement of A241816.
Cf. A091067.

Programs

  • Mathematica
    Select[2 * Range[120], Mod[# / 2^IntegerExponent[#, 2], 4] == 3 &] (* Amiram Eldar, Aug 31 2024 *)
  • PARI
    is(k) = !(k % 2) && (k >> valuation(k, 2)) % 4 == 3; \\ Amiram Eldar, Aug 31 2024

Formula

a(n) = 2*A091067(n). - Antti Karttunen, Feb 20 2015

Extensions

More terms from Alois P. Heinz, Sep 07 2014
New definition added to name by Antti Karttunen, Feb 20 2015

A379015 a(n) is the reversed non-adjacent form (NAF) representation of n.

Original entry on oeis.org

0, 1, 1, -3, 1, 5, -3, -7, 1, 9, 5, -19, -3, 13, -7, -15, 1, 17, 9, -11, 5, 21, -19, -35, -3, 29, 13, -39, -7, 25, -15, -31, 1, 33, 17, -23, 9, 41, -11, -27, 5, 37, 21, -83, -19, 45, -35, -67, -3, 61, 29, -51, 13, 77, -39, -71, -7, 57, 25, -79, -15, 49, -31, -63
Offset: 0

Views

Author

Darío Clavijo, Dec 13 2024

Keywords

Comments

Fixed points exist when the non-adjacent form is palindromic.

Examples

			For n=7 a(7) = -7 because:
7 to NAF encoding read from least to most significant bit: [-1, 0, 0, 1]
Reversed: [1, 0, 0, -1]
NAF to integer: -7.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Module[{E=n,r=0},While[E>0,If[OddQ[E],Module[{Zi=2-Mod[E,4]},E-=Zi;r+=Zi;]];E=Floor[E/2];r*=2;];Floor[r/2]];Table[a[n],{n,0,63}] (* James C. McMahon, Dec 26 2024 *)
  • PARI
    a(n) = { my (r = 0, d); while (n, if (n%2, d = 2 - (n % 4); r += d; n -= d;); r *= 2; n \= 2;); return (r \ 2); } \\ Rémy Sigrist, Dec 28 2024
  • Python
    def a(n):
        E, r = n, 0
        while E:
            if E & 1:
                Zi = 2 - (E & 3)
                E -= Zi
                r += Zi
            E >>= 1
            r <<= 1
        return r >> 1
    print([a(n) for n in range(0,64)])
    

Formula

a(2^k) = 1.
a(A091072(n)) > 0 iff a(n) is in A016813.
a(A091067(n)) < 0 iff abs(a(n)) is in A004767.

Extensions

a(0) = 0 prepended by Rémy Sigrist, Dec 28 2024

A106838 Numbers m such that m, m+1 and m+2 have odd part of the form 4*k+3.

Original entry on oeis.org

22, 46, 54, 86, 94, 110, 118, 150, 174, 182, 190, 214, 222, 238, 246, 278, 302, 310, 342, 350, 366, 374, 382, 406, 430, 438, 446, 470, 478, 494, 502, 534, 558, 566, 598, 606, 622, 630, 662, 686, 694, 702, 726, 734, 750, 758, 766, 790, 814, 822, 854, 862
Offset: 1

Views

Author

Ralf Stephan, May 03 2005

Keywords

Comments

Either of form 2a(m)+2 or 32k+22, k>=0, 0
Number points of the Heighway/Harter dragon curve starting m=0 at the origin. Those m with odd part 4k+3 (A091067) are where the curve turns right. So this sequence is the first m of each run of 3 consecutive right turns. There are no runs of 4 or more since the turn at odd m alternates left and right. Bates, Bunder, and Tognetti (Theorem 19, page 104), show the last of each run is integers of the form 2^p*(4k+3) with p>=3. So here the first of each run is a(n) = 8*A091067(n)-2 as Ralf Stephan already noted. - Kevin Ryde, Mar 12 2020
The asymptotic density of this sequence is 1/16. - Amiram Eldar, Sep 14 2024

Examples

			22/2=11 is 3 mod 4 and so is 23 and 24/8=3, thus 22 is in sequence.
		

Crossrefs

Programs

  • Mathematica
    opm4[n_]:=Mod[n/2^IntegerExponent[n,2],4]; Flatten[Position[Partition[ Table[opm4[n],{n,1000}],3,1],{3,3,3}]] (* Harvey P. Dale, Feb 01 2014 *)

Formula

a(n) = 8*A091067(n) - 2.

A322015 If A003188(n+1) < A003188(n), then a(n) = n+1, otherwise a(n) = 0.

Original entry on oeis.org

0, 0, 3, 0, 0, 6, 7, 0, 0, 0, 11, 12, 0, 14, 15, 0, 0, 0, 19, 0, 0, 22, 23, 24, 0, 0, 27, 28, 0, 30, 31, 0, 0, 0, 35, 0, 0, 38, 39, 0, 0, 0, 43, 44, 0, 46, 47, 48, 0, 0, 51, 0, 0, 54, 55, 56, 0, 0, 59, 60, 0, 62, 63, 0, 0, 0, 67, 0, 0, 70, 71, 0, 0, 0, 75, 76, 0, 78, 79, 0, 0, 0, 83, 0, 0, 86, 87, 88, 0, 0, 91, 92, 0, 94, 95, 96
Offset: 0

Author

Antti Karttunen, Nov 24 2018

Keywords

Crossrefs

Programs

A341522 a(n) = A156552(3*A005940(1+n)).

Original entry on oeis.org

2, 5, 6, 11, 10, 13, 14, 23, 18, 21, 22, 27, 26, 29, 30, 47, 34, 37, 38, 43, 42, 45, 46, 55, 50, 53, 54, 59, 58, 61, 62, 95, 66, 69, 70, 75, 74, 77, 78, 87, 82, 85, 86, 91, 90, 93, 94, 111, 98, 101, 102, 107, 106, 109, 110, 119, 114, 117, 118, 123, 122, 125, 126, 191, 130, 133, 134, 139, 138, 141, 142, 151, 146, 149
Offset: 0

Author

Antti Karttunen, Feb 15 2021

Keywords

Comments

Because the least significant 0-bit in A156552-code of any nonzero multiple of 3 is always alone (has 1-bit immediately to its left), it follows that A255068 (= A091067(n+1) - 1) gives these same terms in the ascending order.

Crossrefs

Row/column 2 of A341520. Permutation of A255068.
Cf. A005940, A007814, A156552, A086799, A014707 (characteristic function).

Programs

  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    A156552(n) = { my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res };
    A341522(n) = A156552(3*A005940(1+n));

Formula

a(n) = A156552(3*A005940(1+n)).
From Antti Karttunen, Feb 23 2021: (Start)
a(n) = 1 + n + A086799(1+n). - [Conjectured by LODA-miner, and easily seen to be correct]
a(n) = 1+ 2*n + 2^A007814(1+n). - [As the above can be rewritten to this]
(End)
Previous Showing 21-30 of 32 results. Next