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 44 results. Next

A141164 Numbers having exactly 1 divisor of the form 8*k + 7.

Original entry on oeis.org

7, 14, 15, 21, 23, 28, 30, 31, 35, 39, 42, 45, 46, 47, 49, 55, 56, 60, 62, 69, 70, 71, 75, 77, 78, 79, 84, 87, 90, 91, 92, 93, 94, 95, 98, 103, 110, 111, 112, 115, 117, 120, 124, 127, 133, 138, 140, 141, 142, 143, 147, 150, 151, 154, 155, 156, 158, 159, 167, 168, 174, 180, 182, 183, 184, 186, 188, 190, 191, 196, 199
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 26 2011

Keywords

Examples

			a(1) = A188226(1) = 7.
		

Crossrefs

Numbers having m divisors of the form 8*k + i: A343107 (m=1, i=1), A343108 (m=0, i=3), A343109 (m=0, i=5), A343110 (m=0, i=7), A343111 (m=2, i=1), A343112 (m=1, i=3), A343113 (m=1, i=5), this sequence (m=1, i=7).
Indices of 1 in A188172.
A007522 is a subsequence.
Cf. A004771.

Programs

  • Haskell
    import Data.List (elemIndices)
    a141164 n = a141164_list !! (n-1)
    a141164_list = map succ $ elemIndices 1 $ map a188172 [1..]
    
  • Mathematica
    okQ[n_] := Length[Select[Divisors[n] - 7, Mod[#, 8] == 0 &]] == 1; Select[Range[200], okQ]
  • PARI
    res(n, a, b) = sumdiv(n, d, (d%a) == b)
    isA141164(n) = (res(n, 8, 7) == 1) \\ Jianing Song, Apr 06 2021

Formula

A188172(a(n)) = 1.

A261246 Positive integers D such that the generalized Pell equation X^2 - D Y^2 = 2 is soluble.

Original entry on oeis.org

2, 7, 14, 23, 31, 34, 46, 47, 62, 71, 79, 94, 98, 103, 119, 127, 142, 151, 158, 167, 191, 194, 199, 206, 223, 238, 239, 254, 263, 271, 287, 302, 311, 322, 334, 343, 359, 367, 382, 383, 386, 391, 398, 431, 439, 446, 463, 478, 479, 482, 487, 503, 511
Offset: 1

Views

Author

Wolfdieter Lang, Sep 06 2015

Keywords

Comments

For the fundamental positive solution x(n)^2 - a(n)*y(n)^2 = 2 see (x(n) = A261247(n), y(n) = A261248(n)), for n >= 1.
Conjecture: The sequence consists of all numbers D not a square and even D = 2*d has odd d with prime factors of the form 1 or 7 (mod 8). Odd D has prime factors of the form 1 or 7 (mod 8) but there is an odd number of primes of the form 7 (mod 8). The following will prove that these conditions for D are necessary in order to have solutions.
This conjecture is false. For the odd D case see the counterexamples in A263010, and for the even D in A264352. - Wolfdieter Lang, Nov 12 2015
If there is a solution for D, D not a square, then only one class of solution exists due to Nagell's Theorem 110, p. 208, because then 2 divides 2*D. All solutions will be proper because 2 is a prime.
For the even prime D = p = 2 the positive fundamental solution is [x(1) = 2, y(1) = 1].
For odd primes D = p there can be solutions only for p == +7 (mod 8), that is p from A007522. Then x and y are both odd. Proof: Consider a solution of x^2 - p*y^2 = 2. The parities of x and y have to be either even and even or odd and odd. For odd x one has x^2 == +1 (mod 8) (because x^2 = 8*T(X) + 1 with x = 2*X+1 and the triangular numbers T = A000217); similarly for y^2 if y is odd. In the even-even case x^2 and y^2 are both congruent to 4 (mod 8). The even-even case leads to 4 - 4*p = 2 (mod 8), excluding all odd p, namely p == 1, 3, 5, 7 (mod 8). The odd-odd case is 1 - p*1 = 2 (mod 8), and p == 1, 3, 5 (mod 8) are excluded. Therefore, only p == 7 (mod 8) qualifies for a solution, and then x and y will be both odd.
For D = p == 7 (mod 8) from A007522 one can test if there exists a fundamental positive solution (at most one class can exist, therefore there is either no solution or just one) [2*U(p)+1, 2*V(p)+1] by checking the two inequalities (see Nagell, eq. (4) and (5), p. 206) 0 <= V(p) < floor((Y(p)/sqrt(X(p) + 1) - 1)/2) and 0 <= U(p) <= floor((sqrt(X(p) + 1) - 1)/2), with the positive fundamental solution [X(p), Y(p)] of X^2 - p*Y^2 = +1. These solutions can be found in (A033313(k), A033317(k)) if A000037(k) is the prime p == 7 (mod 8) one is testing.
For composite even D there are solutions only if D/2 is odd. Proof: If D is even then x has to be even, hence x^2 == 0 (mod 4) and then D*y^2 == -2 (mod 4), hence D cannot be 0 (mod 4). Thus an even D can only be of the form D = 2*d with d odd. The modulo 3 and modulo 5 argument used in the next case will show that d can have only prime factors of the form +1 or -1 (mod 8).
For composite odd D one finds like above that the even-even x and y case is excluded, and the odd-odd case needs D == -1 (mod 8) == 7 (mod 8). Hence a candidate for D is from A004771 - A007522. D cannot have any prime factor p of the form 3 or 5 (mod 8) because otherwise x^2 == 2 (mod p), but the Legendre symbol (2/p) = -1 for such p's (see, e.g., Nagell, Theorem 81, p. 136). For example, D = 15 = 3*5 cannot have a solution. Thus the only candidates for D have prime factors p of the form +1 or +7 (mod 8), with the number of the latter ones being odd. E.g., D = 7*17 = 119 qualifies as a candidate and it has indeed solutions, namely the ones obtainable from the fundamental one [11, 1].
The general proper positive solutions for D(n) = a(n) are obtained from the fundamental ones [x(n), y(n)] given in A261247 and A261248 with the help of powers of the matrix M(n) = [[u(n), D(n)*v(n)], [v(n), u(n)]], where u(n) and v(n) are the positive fundamental solutions of U(n) - D(n)*V(n) = 1, by (x(n; k), y(n; k))^T = M(n)^k (x(n), y(n))^T (T for transposed), for k >= 0. [u(n), v(n)] = [A033313(j(n)), A033317(j(n))] if A000037(j(n)) = D(n) = a(n).
Observation: All degrees (7, 47, 79, 103, 119, 127) of the modular equations derived for solving Ramanujan's question 699 by Galkin & Kozirev (see reference and A318732) are terms of this sequence. - Hugo Pfoertner, Sep 24 2023

Examples

			The first fundamental solutions [x(n), y(n)] are (the first entry gives D(n)=a(n)):
[2, [2, 1]], [7, [3, 1]], [14, [4, 1]],
[23, [5, 1]], [31, [39, 7]], [34, [6, 1]],
[46, [156, 23]], [47, [7, 1]], [62, [8, 1]],
[71, [59, 7]], [79, [9, 1]], [94, [1464, 151]],
[98, [10, 1]], [103, [477, 47]], [119, [11, 1]],
[127, [2175, 193]], [142, [12, 1]],
[151, [41571, 3383]], [158, [88, 7]],
[167, [13, 1]], [191, [2999, 217]],
[194, [14, 1]], [199, [127539, 9041]],
[206, [244, 17]], [223, [15, 1]], [238, [108, 7]],
[239, [2489, 161]], ...
		

References

  • J. W. S. Cassels, Rational Quadratic Forms, Cambridge, 1978; see Chap. 3.
  • V. M. Galkin, O. R. Kozyrev, On an algebraic problem of Ramanujan, pp. 89-94 in Number Theoretic And Algebraic Methods In Computer Science - Proceedings Of The International Conference, Moscow 1993, Ed. Horst G. Zimmer, World Scientific, 31 Aug 1995
  • T. Nagell, Introduction to Number Theory, Chelsea Publishing Company, New York, 1964.

Crossrefs

See also A038873 (2 and primes == +-1 mod 8), A001132.

Programs

  • Mathematica
    Select[Range[600], False =!= Reduce[x^2 - # y^2 == 2, {x, y}, Integers] &] (* Giovanni Resta, Aug 12 2017 *)

A188172 Number of divisors d of n of the form d == 7 (mod 8).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 2, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1
Offset: 1

Views

Author

R. J. Mathar, Mar 23 2011

Keywords

Examples

			a(A007522(i)) = 1, any i.
		

Crossrefs

Programs

  • Haskell
    a188172 n = length $ filter ((== 0) . mod n) [7,15..n]
    -- Reinhard Zumkeller, Mar 26 2011
    
  • Maple
    sigmamr := proc(n,m,r) local a,d ; a := 0 ; for d in numtheory[divisors](n) do if modp(d,m) = r then a := a+1 ; end if; end do: a; end proc:
    A188172 := proc(n) sigmamr(n,8,7) ; end proc:
  • Mathematica
    Table[Count[Divisors[n],?(Mod[#,8]==7&)],{n,90}] (* _Harvey P. Dale, Mar 08 2014 *)
  • PARI
    a(n) = sumdiv(n, d, (d % 8) == 7); \\ Amiram Eldar, Nov 25 2023

Formula

A188170(n)+a(n) = A001842(n).
A188169(n)+A188170(n)-A188171(n)-a(n) = A002325(n).
a(A188226(n))=n and a(m)<>n for m<A188226(n), n>=0; a(A141164(n))=1. - Reinhard Zumkeller, Mar 26 2011
G.f.: Sum_{k>=1} x^(7*k)/(1 - x^(8*k)). - Ilya Gutkovskiy, Sep 11 2019
Sum_{k=1..n} a(k) = n*log(n)/8 + c*n + O(n^(1/3)*log(n)), where c = gamma(7,8) - (1 - gamma)/8 = -0.212276..., gamma(7,8) = -(psi(7/8) + log(8))/8 is a generalized Euler constant, and gamma is Euler's constant (A001620) (Smith and Subbarao, 1981). - Amiram Eldar, Nov 25 2023

A125169 a(n) = 16*n + 15.

Original entry on oeis.org

15, 31, 47, 63, 79, 95, 111, 127, 143, 159, 175, 191, 207, 223, 239, 255, 271, 287, 303, 319, 335, 351, 367, 383, 399, 415, 431, 447, 463, 479, 495, 511, 527, 543, 559, 575, 591, 607, 623, 639, 655, 671, 687, 703, 719, 735, 751, 767, 783, 799, 815, 831, 847
Offset: 0

Views

Author

Artur Jasinski, Nov 22 2006

Keywords

Comments

The identity (16*n + 15)^2 - (16*(n+1)^2 - 2*(n+1))*4^2 = 1 can be written as a(n)^2 - A158058(n+1)*4^2 = 1. - Vincenzo Librandi, Feb 01 2012
a(n-3), n >= 3, appears in the third column of triangle A239126 related to the Collatz problem. - Wolfdieter Lang, Mar 14 2014

Crossrefs

Programs

  • Magma
    I:=[15, 31]; [n le 2 select I[n] else 2*Self(n-1)-Self(n-2): n in [1..60]]; // Vincenzo Librandi, Jan 04 2012
    
  • Mathematica
    Table[16n + 15, {n, 0, 100}]
    LinearRecurrence[{2,-1},{15,31},100] (* or *) Range[15,1620,16] (* Harvey P. Dale, Jan 03 2012 *)
  • PARI
    a(n) = 16*n + 15 \\ Vincenzo Librandi, Jan 04 2012

Formula

a(n) = 2*a(n-1) - a(n-2); a(0)=15, a(1)=31. - Harvey P. Dale, Jan 03 2012
O.g.f.: (15 + x)/(1 - x)^2. - Wolfdieter Lang, Mar 14 2014
From Elmo R. Oliveira, Apr 04 2025: (Start)
E.g.f.: exp(x)*(15 + 16*x).
a(n) = A004771(2*n+1). (End)

A239126 Rectangular array showing the starting values M(n, k), k >= 1, for the Collatz operation (ud)^n, n >= 1, ending in an odd number, read by antidiagonals.

Original entry on oeis.org

3, 7, 7, 11, 15, 15, 15, 23, 31, 31, 19, 31, 47, 63, 63, 23, 39, 63, 95, 127, 127, 27, 47, 79, 127, 191, 255, 255, 31, 55, 95, 159, 255, 383, 511, 511, 35, 63, 111, 191, 319, 511, 767, 1023, 1023, 39, 71, 127, 223, 383, 639, 1023, 1535, 2047, 2047
Offset: 1

Views

Author

Wolfdieter Lang, Mar 13 2014

Keywords

Comments

The companion array and triangle for the odd end numbers N(n, k) is given in A239127.
The two operations on natural numbers m used in the Collatz 3x+1 conjecture are here (following the M. Trümper paper given in the link) denoted by u for 'up' and d for 'down': u m = 3*m+1, if m is odd, and d m = m/2 if m is even. The present array gives all start numbers M(n, k) for the Collatz word (ud)^n = s^n (s = ud is useful because, except for the one letter word u, at least one d follows a letter u), with n >= 1, and k >= 1. Such Collatz sequences have the maximal number of u's (grow fastest).
This rectangular array is M of Example 2.2. with x=y = n, n >= 1, of the M. Trümper reference, pp. 7-8, written as a triangle by taking NE-SW diagonals. The Collatz sequence starting with M(n, k) has length 2*n+1 for each k and it ends in the odd number N(n, k) given in A239127.
The first row sequences of the array M (columns of triangle TM) are A004767, A004771, A125169, A239128, ...

Examples

			The rectangular array M(n, k) begins:
n\k     1    2    3    4     5     6     7     8     9    10 ...
1:      3    7   11   15    19    23    27    31    35    39
2:      7   15   23   31    39    47    55    63    71    79
3:     15   31   47   63    79    95   111   127   143   159
4:     31   63   95  127   159   191   223   255   287   319
5:     63  127  191  255   319   383   447   511   575   639
6:    127  255  383  511   639   767   895  1023  1151  1279
7:    255  511  767 1023  1279  1535  1791  2047  2303  2559
8:    511 1023 1535 2047  2559  3071  3583  4095  4607  5119
9:   1023 2047 3071 4095  5119  6143  7167  8191  9215 10239
10:  2047 4095 6143 8191 10239 12287 14335 16383 18431 20479
...
The triangle TM(m, n) begins (zeros are not shown):
m\n   1    2     3     4     5     6      7      8      9    10 ...
1:    3
2:    7    7
3:   11   15    15
4:   15   23    31    31
5:   19   31    47    63    63
6:   23   39    63    95   127   127
7:   27   47    79   127   191   255    255
8:   31   55    95   159   255   383    511    511
9:   35   63   111   191   319   511    767   1023   1023
10:  39   71   127   223   383   639   1023   1535   2047  2047
...
---------------------------------------------------------------------
n=1, ud, k=1: M(1, 1) = 3 = TM(1, 1), N(1,1) = 5 with the Collatz sequence  [3, 10, 5] of length 3.
n=1, ud, k=2: M(1, 2) = 7 = TM(2, 1), N(1,2) = 11 with the Collatz sequence  [7, 22, 11] of length 3.
n=4, (ud)^4, k=2: M(4, 2) = 63 = TM(5, 4), N(4,2) = 323 with the Collatz sequence  [63, 190, 95, 286, 143, 430, 215, 646, 323] of length 9.
n=5, (ud)^5, k=1: M(5, 1) = 63 =  TM(5, 5), N(5,1) = 485 with the Collatz sequence  [63, 190, 95, 286, 143, 430, 215, 646, 323, 970, 485] of length 11.
		

Crossrefs

Formula

The array: M(n, k) = 2^(n+1)*k - 1 for n >= 1 and k >= 1.
The triangle: TM(m, n) = M(n, m-n+1) = 2^(n+1)*(m-n+1) - 1 for m >= n >= 1 and 0 for m < n.
a(n) = 4*A087808(A130328(n-1)) - 1 (conjectured). - Christian Krause, Jun 15 2021

A004777 Numbers not congruent to 7 mod 8.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Numbers that are congruent to {0, 1, 2, 3, 4, 5, 6} mod 8.
Numbers n such that binary expansion does not end 111.
Complement of A004771. - Michel Marcus, Sep 11 2015

Crossrefs

Programs

Formula

G.f.: x^2*(1+x+x^2+x^3+x^4+x^5+2*x^6) / ((x^6+x^5+x^4+x^3+x^2+x+1)*(x-1)^2). - R. J. Mathar, Oct 08 2011
a(n) = floor((n-1)*8/7). - M. F. Hasler, Nov 02 2013
From Wesley Ivan Hurt, Sep 11 2015: (Start)
a(n) = a(n-1) + a(n-7) - a(n-8) for n>8.
a(n) = n - 1 + A132270(n). (End)
From Wesley Ivan Hurt, Jul 20 2016: (Start)
a(n) = (56*n - 77 + (n mod 7) + ((n+1) mod 7) + ((n+2) mod 7) + ((n+3) mod 7) + ((n+4) mod 7) + ((n+5) mod 7) - 6*((n+6) mod 7))/49.
a(7k) = 8k-2, a(7k-1) = 8k-3, a(7k-2) = 8k-4, a(7k-3) = 8k-5, a(7k-4) = 8k-6, a(7k-5) = 8k-7, a(7k-6) = 8k-8. (End)

Extensions

Edited by N. J. A. Sloane Aug 31 2009 at the suggestion of R. J. Mathar.

A047521 Numbers that are congruent to {0, 7} mod 8.

Original entry on oeis.org

0, 7, 8, 15, 16, 23, 24, 31, 32, 39, 40, 47, 48, 55, 56, 63, 64, 71, 72, 79, 80, 87, 88, 95, 96, 103, 104, 111, 112, 119, 120, 127, 128, 135, 136, 143, 144, 151, 152, 159, 160, 167, 168, 175, 176, 183, 184, 191, 192, 199, 200, 207, 208, 215, 216, 223, 224, 231, 232
Offset: 1

Views

Author

Keywords

Comments

Numbers such that the n-th triangular number is divisible by 4. - Charles R Greathouse IV, Apr 07 2011
Except for 0, numbers whose binary reflected Gray code (A014550) ends with 00. - Amiram Eldar, May 17 2021

Crossrefs

Union of A008590 and A004771.

Programs

  • Mathematica
    {#,#+7}&/@(8*Range[0,30])//Flatten (* or *) LinearRecurrence[{1,1,-1},{0,7,8},60] (* Harvey P. Dale, Oct 30 2016 *)
  • PARI
    a(n) = 4*n - 5/2 + 3*(-1)^n/2; \\ David Lovler, Jul 25 2022
  • R
    kmax <- 10 # by choice
    a <- c(0,7)
    for(k in 3:kmax) a <- c(a, a + 2^k)
    a
    # Yosu Yurramendi, Jan 18 2022
    

Formula

a(n) = 8*n - a(n-1) - 9 (with a(1)=0). - Vincenzo Librandi, Aug 06 2010
From R. J. Mathar, Oct 08 2011: (Start)
a(n) = 3*(-1)^n/2 - 5/2 + 4*n.
G.f.: x^2*(7+x) / ( (1+x)*(x-1)^2 ). (End)
a(n+1) = Sum_{k>=0} A030308(n,k)*b(k) with b(0)=7 and b(k)=2^(k+2) for k > 0. - Philippe Deléham, Oct 17 2011
Sum_{n>=2} (-1)^n/a(n) = log(2)/2 + sqrt(2)*log(sqrt(2)+1)/8 - (sqrt(2)+1)*Pi/16. - Amiram Eldar, Dec 18 2021
E.g.f.: 1 + ((8*x -5)*exp(x) + 3*exp(-x))/2. David Lovler, Aug 22 2022

Extensions

More terms from Vincenzo Librandi, Aug 06 2010

A047550 Numbers that are congruent to {5, 7} mod 8.

Original entry on oeis.org

5, 7, 13, 15, 21, 23, 29, 31, 37, 39, 45, 47, 53, 55, 61, 63, 69, 71, 77, 79, 85, 87, 93, 95, 101, 103, 109, 111, 117, 119, 125, 127, 133, 135, 141, 143, 149, 151, 157, 159, 165, 167, 173, 175, 181, 183, 189, 191, 197, 199, 205, 207, 213, 215, 221, 223, 229, 231, 237, 239, 245, 247, 253, 255, 261
Offset: 1

Views

Author

Keywords

Crossrefs

Union of A004770 and A004771.

Programs

  • Maple
    A047550:=n->4*n-(-1)^n; seq(A047550(n), n=1..100); # Wesley Ivan Hurt, Mar 31 2014
  • Mathematica
    With[{r8=8*Range[0,40]},Sort[Join[r8+5,r8+7]]] (* or *) LinearRecurrence[ {1,1,-1},{5,7,13},80] (* Harvey P. Dale, Jun 04 2012 *)
    Table[4 n - (-1)^n, {n, 100}] (* Wesley Ivan Hurt, Mar 31 2014 *)
  • PARI
    Vec(x*(5+2*x+x^2)/((1-x)^2*(1+x)) + O(x^100)) \\ Colin Barker, Aug 26 2016

Formula

a(n) = 8*n-a(n-1)-4 (with a(1)=5). - Vincenzo Librandi, Aug 06 2010
a(n) = 4*n-(-1)^n. - Rolf Pleisch, Nov 02 2010
a(1)=5, a(2)=7, a(3)=13; for n>3, a(n) = a(n-1)+a(n-2)-a(n-3). - Harvey P. Dale, Jun 04 2012
G.f.: x*(5+2*x+x^2) / ((1-x)^2*(1+x)). - Colin Barker, Aug 26 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/8 - sqrt(2)*log(sqrt(2)+1)/4. - Amiram Eldar, Dec 19 2021
E.g.f.: 1 + 4*x*exp(x) - exp(-x). - David Lovler, Sep 02 2022

Extensions

More terms from Vincenzo Librandi, Aug 06 2010

A188226 Smallest number having exactly n divisors of the form 8*k + 7.

Original entry on oeis.org

1, 7, 63, 315, 945, 1575, 3465, 19845, 10395, 17325, 26775, 127575, 45045, 266805, 190575, 155925, 135135, 2480625, 225225, 130203045, 405405, 1289925, 2168775, 1715175, 675675, 3898125, 3468465, 1576575, 3239775, 67798585575, 2027025, 16769025, 2297295, 20539575, 42170625, 27286875, 3828825, 117661005
Offset: 0

Views

Author

Reinhard Zumkeller, Mar 26 2011

Keywords

Comments

A188172(a(n)) = n and A188172(m) <> n for m < a(n).

Crossrefs

Smallest number having exactly n divisors of the form 8*k + i: A343104 (i=1), A343105 (i=3), A343106 (i=5), this sequence (i=7).

Programs

  • Haskell
    import Data.List  (elemIndex)
    import Data.Maybe (fromJust)
    a188226 n = a188226_list !! n
    a188226_list =
       map (succ . fromJust . (`elemIndex` (map a188172 [1..]))) [0..]

Extensions

a(19)-a(35) from Nathaniel Johnston, Apr 06 2011
More terms from Bert Dobbelaere, Apr 09 2021

A056753 Only odd numbers occur and for all k there are k numbers between any two successive occurrences of k.

Original entry on oeis.org

1, 3, 1, 5, 1, 3, 1, 7, 1, 3, 1, 9, 1, 3, 1, 7, 1, 3, 1, 11, 1, 3, 1, 7, 1, 3, 1, 13, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1, 3, 1, 17, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1, 3, 1, 19, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1, 3, 1, 21, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1, 3, 1, 23, 1, 3, 1, 7, 1, 3, 1
Offset: 0

Views

Author

Claude Lenormand (claude.lenormand(AT)free.fr), Jan 19 2001

Keywords

Comments

Only the numbers 2^m - 1 occur more than once.
a(A005843(n)) = 1; a(A016813(n)) = 3; a(A004771(n)) = 7; a(A008598(n) + 35) = 15; a(A008598(n) + 155) = 31. - Reinhard Zumkeller, Aug 23 2009
A181497(n) = smallest m such that A056753(m) = 2*n + 1. - Reinhard Zumkeller, Oct 24 2010

Crossrefs

Programs

  • Haskell
    import Data.List (intercalate, group)
    a056753 n = a056753_list !! n
    a056753_list = [1] ++ odds [] where
       odds xs = xs ++ (intercalate xs' $ group [y+2,y+4..2*y+1]) ++ odds xs'
            where y = 2 * length xs + 1
                  xs' = xs ++ [y] ++ xs
    -- Reinhard Zumkeller, Feb 25 2012, Oct 24 2010
  • Magma
    S:=[ 0: n in [1..100] ]; k:=1; p:=Position(S, 0, 1); while p gt 0 do for j in [p..#S by k+1] do if S[j] eq 0 then S[j]:=k; else break; end if; end for; f:=p; p:=Position(S, 0, f); k+:=2; end while; S; // Klaus Brockhaus, Oct 25 2010
    
  • Mathematica
    a[n_] := a[n] = (ClearAll[f]; f[i_, x_, y_, z_] := f[i, x, y, z] = If[i == n, If[x == 1, a[n-z] + 2, a[n-z]], If[x == 1, If[y == 1, f[i+1, 2z, z, 2z], f[i+1, z, y-1, z]], f[i+1, x-1, y, z]]]; If[n == 0, 1, f[1, 1, 1, 1]]); Table[a[n], {n, 0, 98}] (* Jean-François Alcover, Dec 14 2011, after Reinhard Zumkeller *)

Formula

Let x = a(n - A164632(n)), a(n) = if (x occurred exactly once so far) then x+2 else x. - Reinhard Zumkeller, Aug 23 2009
Previous Showing 11-20 of 44 results. Next