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.

A179676 Numbers m=2*n-1 for all n>2 not in A179460.

Original entry on oeis.org

7, 15, 21, 23, 31, 35, 39, 45, 47, 49, 51, 55, 63, 71, 73, 75, 79, 85, 87, 89, 91, 93, 95, 103, 105, 111, 115, 117, 119, 123, 127, 133, 135, 143, 147, 151, 153, 155, 159, 161, 165, 167, 175, 183, 187, 189, 191, 195, 199, 215, 217, 219, 221, 223, 225, 231, 233, 235, 237, 239, 245, 247, 253, 255, 259
Offset: 1

Views

Author

Vladimir Shevelev, Jul 24 2010

Keywords

Comments

Consider the algorithm of calculation ord_(2n-1)(2) in A179680, and the average of the 2-adic orders l_1, ..., l_k defined there. For terms of the sequence it is more than 2, while for other odd numbers(>=3), it equals 2. This means that only for the terms of the sequence the number of odd residues in {1,2,...,2^ord_(2*n-1)(2)} (considered in the reduced residue system modulo 2*n-1)less than even ones.

Crossrefs

A179680 The number of exponents >1 in a recursive reduction of 2n-1 until reaching an odd part equal to 1.

Original entry on oeis.org

0, 1, 1, 1, 1, 3, 3, 1, 1, 5, 1, 3, 5, 5, 7, 1, 1, 3, 9, 3, 3, 3, 3, 6, 5, 2, 13, 5, 3, 15, 15, 1, 1, 17, 5, 9, 1, 5, 7, 10, 13, 21, 1, 7, 2, 3, 2, 9, 11, 9, 25, 13, 2, 27, 9, 9, 5, 11, 2, 6, 27, 5, 25, 1, 1, 33, 3, 9, 15, 35, 11, 15, 3, 11, 37, 3, 6, 5, 13, 13
Offset: 1

Views

Author

Vladimir Shevelev, Jul 24 2010

Keywords

Comments

Let N = 2n-1. Then consider the following algorithm of updating pairs (v,m) indicating highest exponent of 2 (2-adic valuation) and odd part: Initialize at step 1 by v(1) = A007814(N+1) and m(1) = A000265(N+1). Iterate over steps i>=2: v(i) = A007814(N+m(i-1)), m(i) = A000265(N+m(i-1)) using the previous odd part m(i-1) until some m(k) = 1. a(n) is defined as the count of the v(i) which are larger than 1.
This is an algorithm to compute A002326 because the sum v(1)+v(2)+ ... +v(k) of the exponents is A002326(n-1).
A179382(n) = 1 + the number of iterations taken by the algorithm when starting from N = 2n-1. - Antti Karttunen, Oct 02 2017

Examples

			For n = 9, 2*n-1 = 17, we have v_1 = v_2 = v_3 = 1, v_4 = 5. Thus a(9) = 1.
For n = 10, 2*n-1 = 19, we have v_1 = 2, v_2 = 3, v_3 = v_4 = v_5 = 1, v_6 = v_7 = 2, v_8 = 1, v_9 = 5. Thus a(10) = 5.
		

Crossrefs

Programs

  • Maple
    A179680 := proc(n) local l,m,a ,N ; N := 2*n-1 ; a := 0 ; l := A007814(N+1) ; m := A000265(N+1) ; if l > 1 then a := a+1 ; end if; while m <> 1 do l := A007814(N+m) ; if l > 1 then a := a+1 ; end if; m := A000265(N+m) ; end do: a ; end proc:
    seq(A179680(n),n=1..80) ; # R. J. Mathar, Apr 05 2011
  • Mathematica
    a7814[n_] := IntegerExponent[n, 2];
    a265[n_] := n/2^IntegerExponent[n, 2];
    a[n_] := Module[{l, m, k, nn}, nn = 2n-1; k = 0; l = a7814[nn+1]; m = a265[nn+1]; If[l>1, k++]; While[m != 1, l = a7814[nn+m]; If[l>1, k++]; m = a265[nn+m]]; k];
    Array[a, 80] (* Jean-François Alcover, Jul 30 2018, after R. J. Mathar *)
  • Sage
    def A179680(n):
        s, m, N = 0, 1, 2*n - 1
        while True:
            k = N + m
            v = valuation(k, 2)
            if v > 1: s += 1
            m = k >> v
            if m == 1: break
        return s
    print([A179680(n) for n in (1..80)]) # Peter Luschny, Oct 07 2017
  • Scheme
    (define (A179680 n) (let ((x (+ n n -1))) (let loop ((s (- 1 (A000035 n))) (k 1)) (let ((m (A000265 (+ x k)))) (if (= 1 m) s (loop (+ s (if (> (A007814 (+ x m)) 1) 1 0)) m)))))) ;; Antti Karttunen, Oct 02 2017
    

A179481 a(n) = 2*t(n)-1 where t(n) is the sequence of records positions of A179480.

Original entry on oeis.org

3, 7, 11, 19, 23, 29, 37, 47, 53, 59, 67, 71, 79, 83, 101, 103, 107, 131, 139, 149, 163, 167, 173, 179, 191, 197, 199, 211, 227, 239, 263, 269, 271, 293, 311, 317, 347, 359, 367, 373, 379, 383, 389, 419, 443, 461, 463, 467, 479, 487, 491, 503, 509, 523, 541
Offset: 2

Views

Author

Vladimir Shevelev, Jul 16 2010

Keywords

Comments

Question. Is every term of this sequence prime?
From Gary W. Adamson, Sep 04 2012: (Start)
In answer to the primality question and pursuant to the Coach Theorem of Hilton and Pedersen: phi(b) = 2 * k * c, with b an odd integer and k in A003558, and c (the numbers of coaches) in A135303; iff phi(b) = (b-1) then b = p, prime. This implies that if b has one coach and k = (b-1)/2, b must be prime since phi(b) = 2 * k * c = 2 * (b-1)/2 * 1 = (b-1). Conjectures: all terms in A179481 have one coach with k = (b-1)/2 and are therefore primes. Next, if A179480(n) is a new record high value, then so is A003558(n-1); but not necessarily the converse (e.g. 13), and the corresponding value of k for b is (b-1)/2. Examples: b = 13 has one coach with k (sum of bottom row terms ) = 6 = A003558(6); and r (number of entries in each row) = 3:
13: [1, 3, 5]
......2, 1, 3. This example satisfies the primality requirements since phi(13) = 12 = 2 * k * c = 2 * 6 * 1; but not the new record requirement for r = 3 since A179480(6) = 3, corresponding to 11, not 13. As shown in the coach for 11:
11: [1, 3, 3]
......1, 1, 3; k = (b-1)/2 with r = 3 and c = 1. Therefore, 11 is in A179481 but not 13. (End)

References

  • P. Hilton and J. Pedersen, A Mathematics Tapestry, Demonstrating the Beautiful Unity of Mathematics, 2010, Cambridge University Press, pp. 260-264.

Crossrefs

Extensions

Edited by N. J. A. Sloane, Jul 18 2010
More terms from R. J. Mathar, Jul 18 2010
Showing 1-3 of 3 results.