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.

Showing 1-3 of 3 results.

A160542 Not divisible by 11.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 111, 112
Offset: 1

Views

Author

Zerinvary Lajos, May 18 2009

Keywords

Comments

Contains numbers like 100, 111, 112, 113 which are not in A043096. - R. J. Mathar, May 20 2009

Crossrefs

Cf. A043096.

Programs

  • Maple
    A160541 := proc(n)
        option remember ;
        if n <= 10 then
            n;
        else
            procname(n-10)+11 ;;
        end if;
    end proc:
    seq(A160541(n),n=1..100) ; # R. J. Mathar, Aug 05 2022
  • Mathematica
    Select[Table[n,{n,200}],Mod[#,11]!=0&] (* Vladimir Joseph Stephan Orlovsky, Feb 18 2011 *)
    LinearRecurrence[{1,0,0,0,0,0,0,0,0,1,-1},{1,2,3,4,5,6,7,8,9,10,12},70] (* Harvey P. Dale, Sep 16 2020 *)
  • Sage
    [i for i in range(72) if gcd(11, i) == 1]

Formula

a(n) = a(n-10) + 11, n>10. - R. J. Mathar, May 20 2009
G.f.: x*(1+x+x^2+x^3+x^4+x^5+x^6+x^7+x^8+x^9+x^10) / ( (1+x)*(1+x+x^2+x^3+x^4)*(x^4-x^3+x^2-x+1)*(x-1)^2 ). - R. J. Mathar, May 02 2014
Sum_{n>=1} (-1)^(n+1)/a(n) = (cot(Pi/11) - cot(2*Pi/11) + tan(Pi/22) - tan(3*Pi/22) + tan(5*Pi/22)) * Pi/11. - Amiram Eldar, May 11 2025

A363270 The result, starting from n, of Collatz steps x -> (3x+1)/2 while odd, followed by x -> x/2 while even.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 13, 1, 7, 5, 13, 3, 5, 7, 5, 1, 13, 9, 11, 5, 1, 11, 5, 3, 19, 13, 31, 7, 11, 15, 121, 1, 25, 17, 5, 9, 7, 19, 67, 5, 31, 21, 49, 11, 17, 23, 121, 3, 37, 25, 29, 13, 5, 27, 47, 7, 43, 29, 67, 15, 23, 31, 91, 1, 49, 33, 19, 17, 13, 35, 121, 9, 55
Offset: 1

Views

Author

Dustin Theriault, May 23 2023

Keywords

Comments

Each x -> (3x+1)/2 step decreases the number of trailing 1-bits by 1 so A007814(n+1) of them, and the result of those steps is 2*A085062(n).

Crossrefs

Cf. A160541 (number of iterations).
Cf. A075677.

Programs

  • C
    int a(int n) {
      while (n & 1) n += (n >> 1) + 1;
      while (!(n & 1)) n >>= 1;
      return n;
    }
    
  • Mathematica
    OddPart[x_] := x / 2^IntegerExponent[x, 2]
    Table[OddPart[(3/2)^IntegerExponent[i + 1, 2] * (i + 1) - 1], {i, 100}]
  • PARI
    oddpart(n) = n >> valuation(n, 2); \\ A000265
    a(n) = oddpart((3/2)^valuation(n+1, 2)*(n+1) - 1); \\ Michel Marcus, May 24 2023

Formula

a(n) = OddPart((3/2)^A007814(n+1)*(n+1) - 1), where OddPart(t) = A000265(t).
a(n) = OddPart(A085062(n)).

A346965 a(n) is the number of ascending subsequences in reducing n to 1 using the Collatz reduction, or -1 if n refutes the Collatz conjecture.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 3, 0, 4, 1, 3, 1, 2, 3, 2, 0, 3, 4, 4, 1, 1, 3, 2, 1, 5, 2, 17, 3, 4, 2, 16, 0, 6, 3, 2, 4, 4, 4, 6, 1, 17, 1, 6, 3, 4, 2, 16, 1, 5, 5, 5, 2, 2, 17, 17, 3, 7, 4, 6, 2, 3, 16, 15, 0, 6, 6, 5, 3, 3, 2, 16, 4, 18, 4, 2, 4, 5, 6, 6, 1, 4, 17, 17
Offset: 1

Views

Author

Douglas Boffey, Aug 09 2021

Keywords

Comments

In this sequence, a subsequence is considered ascending for as long as a (3*n + 1) / 2 step is required.

Examples

			a(9) = 4, viz.
  9->14;
  14->7->11->17->26;
  26->13->20;
  20->10->5->8.
		

Crossrefs

Programs

  • C
    /* A007814 */
    int num_clear_bits(unsigned n) {
      if (n == 0)
        return -1;
      return log2(n & -n);
    }
    int A346965(unsigned n) {
      int x;
      int result = 0;
      n >>= num_clear_bits(n);
      while (n > 1) {
        x = num_clear_bits(n + 1);
        n = ((n >> x) + 1) * pow(3, x) - 1;
        n >>= num_clear_bits(n);
        ++result;
      }
      return result;
    }

Formula

a(2^n) = 0.
a((2^n*(2*x+1)-1) * 2^y) = a(3^n*(2*x+1)-1) + 1, where x, y >= 0.
a(n) = a(A085062(n)) + (n mod 2) for n >= 2. - Alan Michael Gómez Calderón, Feb 09 2025
a(n) = A160541(A000265(n)). - Alan Michael Gómez Calderón, Mar 19 2025
Showing 1-3 of 3 results.