login
This site is supported by donations to The OEIS Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or to make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
Search: 118
Displaying 1-10 of 7264 results found. page 1 2 3 4 5 6 7 8 9 10 ... 727
     Sort: relevance | references | number | modified | created      Format: long | short | data
A001358 Semiprimes (or biprimes): products of two primes.
(Formerly M3274 N1323)
+20
1315
4, 6, 9, 10, 14, 15, 21, 22, 25, 26, 33, 34, 35, 38, 39, 46, 49, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 121, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 166, 169, 177, 178, 183, 185, 187 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Numbers of the form p*q where p and q are primes, not necessarily distinct.

These numbers are sometimes called semi-primes or 2-almost primes. In this database the official spelling is "semiprime", not "semi-prime".

Numbers n such that Omega(n) = 2 where Omega(n) = A001222(n) is the sum of the exponents in the prime decomposition of n.

Complement of A100959; A064911(a(n)) = 1. - Reinhard Zumkeller, Nov 22 2004

Meng proved that for any sufficiently large odd integer n, the equation n = a + b + c has solutions where each of a, b, c are semiprimes. The number of such solutions, where lg x = log (base 2)(x), is (1/2)((lg n)/log n)^(1/3))(sigma(n))(n^2)(1+O(1/lg n)) where sigma(n) is a convergent series given by Meng which is greater than 1/2. - Jonathan Vos Post, Sep 16 2005

The graph of this sequence appears to be a straight line with slope 4. However, the asymptotic formula shows that the linearity is an illusion and in fact a(n)/n ~ log n / log log n goes to infinity. See also the graph of A066265 = number of semiprimes < 10^n.

A002033(a(n)) = 2 or 3. - Juri-Stepan Gerasimov, Dec 01 2009

A174956(a(n)) = n. - Reinhard Zumkeller, Apr 03 2010

For numbers between 33 and 15495, semiprimes are more plentiful than any other k-almost prime. See A125149.

Numbers that are divisible by exactly 2 prime powers (not including 1). - Jason Kimberley, Oct 02 2011

sum(n >= 1, 1/a(n)^s) = (1/2)*(P(s)^2-P(2*s)), where P is Prime Zeta. - Enrique Pérez Herrero, Jun 24 2012

The (disjoint) union of A006881 and A001248. - Jason Kimberley, Nov 11 2015

An equivalent definition of this sequence is a'(n) = smallest composite number which is not divided by any smaller composite number a'(1),...,a'(n-1). - Meir-Simchah Panzer, Jun 22 2016

REFERENCES

Archimedeans Problems Drive, Eureka, 17 (1954), 8.

R. Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; Chapter II, Problem 60.

E. Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Vol. 1, Teubner, Leipzig; third edition : Chelsea, New York (1974). See p. 211.

N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

LINKS

T. D. Noe, Table of n, a(n) for n = 1..10000

D. A. Goldston, S. W. Graham, J. Pintz and C. Y. Yildirim, Small gaps between primes and almost primes, arXiv:math/0506067 [math.NT], 2005.

R. K. Guy, Letters to N. J. A. Sloane, June-August 1968

Sh. T. Ishmukhametov, F. F. Sharifullina, On distribution of semiprime numbers, Izvestiya Vysshikh Uchebnykh Zavedenii. Matematika, 2014, No. 8, pp. 53-59. English translation in Russian Mathematics, 2014, Volume 58, Issue 8 , pp 43-48.

Donovan Johnson, Jonathan Vos Post, and Robert G. Wilson v, Selected n and a(n) (2.5 MB)

Dixon Jones, Quickie 593, Mathematics Magazine, Vol. 47, No. 3, May 1974, p. 167.

Edmund Landau, Handbuch der Lehre von der Verteilung der Primzahlen, vol. 1 and vol. 2, Leipzig, Berlin, B. G. Teubner, 1909. See Vol. 1, p. 211.

Xianmeng Meng, On sums of three integers with a fixed number of prime factors, Journal of Number Theory, Vol. 114 (2005), pp. 37-65.

Eric Weisstein's World of Mathematics, Semiprime

Eric Weisstein's World of Mathematics, Almost Prime

Wikipedia, Almost prime

Robert G. Wilson v, Subsequences at various powers of 10.

Index to sequences related to sums of cubes

Index entries for "core" sequences

FORMULA

a(n) ~ n log n / log log n as n -> infinity [Landau, p. 211], [Ayoub].

Recurrence: a(1) = 4; for n > 1, a(n) = smallest composite number which is not a multiple of any of the previous terms. - Amarnath Murthy, Nov 10 2002

a(n) = A088707(n) - 1. - Reinhard Zumkeller, Feb 20 2012

sigma(a(n)) + phi(a(n)) - mu(a(n)) = 2*a(n) + 1.  mu(a(n)) = ceil(sqrt(a(n))) - floor(sqrt(a(n))). - Wesley Ivan Hurt, May 21 2013

mu(a(n)) = -Omega(a(n)) + omega(a(n)) + 1, where mu is the Moebius function, Omega is the count of prime factors with repetition, and omega is the count of distinct prime factors. - Alonso del Arte, May 09 2014

MAPLE

A001358 := proc(n) option remember; local a; if n = 1 then 4; else for a from procname(n-1)+1 do if numtheory[bigomega](a) = 2 then return a; end if; end do: end if; end proc:

seq(A001358(n), n=1..120) ; # R. J. Mathar, Aug 12 2010

MATHEMATICA

Select[Range[200], Plus@@Last/@FactorInteger[#] == 2 &] (* Zak Seidov, Jun 14 2005 *)

nn = 10^4; p = Prime[Range[PrimePi[nn/2]]]; lim = Floor[Sqrt[nn]]; sp = {}; k = 0; While[k++; p[[k]] <= lim, sp = Join[sp, p[[k]]*Take[p, {k, PrimePi[nn/p[[k]]]}]]]; sp = Sort[sp]  (* T. D. Noe, Mar 15 2011 *)

Select[Range[200], PrimeOmega[#]==2&] (* Harvey P. Dale, Jul 17 2011 *)

f[lst_List] := Block[{k = lst[[-1]] + 1}, While[ PrimeQ[k] || Min[ Mod[k, lst]] < 1, k++]; Append[lst, k]]; Nest[f, {4, 6}, 59] (* or *)

NextSemiPrime[n_, k_: 1] := Block[{c = 0, sgn = Sign[k]}, sp = n + sgn; While[c < Abs[k], While[ PrimeOmega[sp] != 2, If[sgn < 0, sp--, sp++]]; If[sgn < 0, sp--, sp++]; c++]; sp + If[sgn < 0, 1, -1]]; NestList[ NextSemiPrime, 2^2, 59] (* Robert G. Wilson v, Sep 19 2012 and modified Dec 22 2012 *)

PROG

(PARI) isA001358(n)={ bigomega(n)==2 } \\ M. F. Hasler, Apr 09 2008

(PARI) for(n=1, 200, isA001358(n) && print1(n", ")) \\ M. F. Hasler, Apr 09 2008

(PARI) list(lim)=my(v=List(), t); forprime(p=2, sqrt(lim), t=p; forprime(q=p, lim\t, listput(v, t*q))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Sep 11 2011

(Haskell)

a001358 n = a001358_list !! (n-1)

a001358_list = filter ((== 2) . a001222) [1..]

(MAGMA) [n: n in [2..200] | &+[d[2]: d in Factorization(n)] eq 2]; // Bruno Berselli, Sep 09 2015

CROSSREFS

Cf. A048623, A048639, A000040 (primes), A014612 (products of 3 primes), A014613, A014614, A072000 ("pi" for semiprimes), A065516 (first differences).

Cf. A077554, A077555, A002024, A072966, A100592, A014673, A068318, A061299, A068318, A087718, A087794, A089994, A089995, A096916, A096932, A106550, A106554, A108541, A108542, A126663, A131284, A138510, A138511, A072931, A072966, A088183, A171963, A006881, A237040 (semiprimes of form n^3 + 1).

Sequences listing r-almost primes, that is, the n such that A001222(n) = r: A000040 (r=1), this sequence (r=2), A014612 (r=3), A014613 (r=4), A014614 (r=5), A046306 (r=6), A046308 (r=7), A046310 (r=8), A046312 (r=9), A046314 (r=10), A069272 (r=11), A069273 (r=12), A069274 (r=13), A069275 (r=14), A069276 (r=15), A069277 (r=16), A069278 (r=17), A069279 (r=18), A069280 (r=19), A069281 (r=20).

KEYWORD

nonn,easy,nice,core

AUTHOR

N. J. A. Sloane, R. K. Guy, Apr 30 1991

EXTENSIONS

More terms from James A. Sellers, Aug 22 2000

STATUS

approved

A005843 The nonnegative even numbers: a(n) = 2n.
(Formerly M0985)
+20
529
0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

-2, -4, -6, -8, -10, -12, -14, ... are the trivial zeros of the Riemann zeta function. - Vivek Suri (vsuri(AT)jhu.edu), Jan 24 2008

If a 2-set Y and an (n-2)-set Z are disjoint subsets of an n-set X then a(n-2) is the number of 2-subsets of X intersecting both Y and Z. - Milan Janjic, Sep 19 2007

A134452(a(n)) = 0; A134451(a(n)) = 2 for n>0. - Reinhard Zumkeller, Oct 27 2007

Omitting the initial zero gives the number of prime divisors with multiplicity of product of terms of n-th row of A077553. - Ray Chandler, Aug 21 2003

A059841(a(n))=1, A000035(a(n))=0. - Reinhard Zumkeller, Sep 29 2008

(APSO) Alternating partial sums of (a-b+c-d+e-f+g...)=(a+b+c+d+e+f+g...)-2*(b+d+f...), it appears that APSO(A005843) = A052928 = A002378 - 2*(A116471), with A116471=2*A008794. - Eric Desbiaux, Oct 28 2008

A056753(a(n)) = 1. - Reinhard Zumkeller, Aug 23 2009

Twice the nonnegative numbers. - Juri-Stepan Gerasimov, Dec 12 2009

The number of hydrogen atoms in straight-chain (C(n)H(2n+2)), branched (C(n)H(2n+2), n > 3), and cyclic, n-carbon alkanes (C(n)H(2n), n > 2). - Paul Muljadi, Feb 18 2010

For n >= 1; a(n) = the smallest numbers m with the number of steps n of iterations of {r - (smallest prime divisor of r)} needed to reach 0 starting at r = m. See A175126 and A175127. A175126(a(n)) = A175126(A175127(n)) = n. Example (a(4)=8): 8-2=6, 6-2=4, 4-2=2, 2-2=0; iterations has 4 steps and number 8 is the smallest number with such result. - Jaroslav Krizek, Feb 15 2010

For n >= 1, a(n) = numbers k such that arithmetic mean of the first k positive integers is not integer. A040001(a(n)) > 1. See A145051 and A040001. - Jaroslav Krizek, May 28 2010

Union of A179082 and A179083. - Reinhard Zumkeller, Jun 28 2010

a(k) is the (Moore lower bound on and the) order of the (k,4)-cage: the smallest k-regular graph having girth four: the complete bipartite graph with k vertices in each part. - Jason Kimberley, Oct 30 2011

For n > 0: A048272(a(n)) <= 0. - Reinhard Zumkeller, Jan 21 2012

Let n be the number of pancakes that have to be divided equally between n+1 children. a(n) is the minimal number of radial cuts needed to accomplish the task. - Ivan N. Ianakiev, Sep 18 2013

For n > 0, a(n) is the largest number k such that (k!-n)/(k-n) is an integer. - Derek Orr, Jul 02 2014

a(n) when n>2 is also the number of permutations simultaneously avoiding 213, 231 and 321 in the classical sense which can be realized as labels on an increasing strict binary tree with 2n-1 nodes. See A245904 for more information on increasing strict binary trees. - Manda Riehl Aug 07 2014

It appears that for n>2, a(n) = A020482(n) + A002373(n), where all sequences are infinite. This is consistent with Goldbach's conjecture, which states that every even number > 2 can be expressed as the sum of two prime numbers. - Bob Selcoe, Mar 08 2015

Number of partitions of 4n into exactly 2 parts. - Colin Barker, Mar 23 2015

Number of neighbors in von Neumann neighborhood. - Dmitry Zaitsev, Nov 30 2015

REFERENCES

T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 2.

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

LINKS

N. J. A. Sloane, Table of n, a(n) for n = 0..10000

Charles Cratty, Samuel Erickson, Frehiwet Negass, Lara Pudwell, Pattern Avoidance in Double Lists, preprint, 2015.

Kevin Fagan, Drabble cartoon, Jun 15 1987: Intelligence Test

Adam M. Goyt and Lara K. Pudwell, Avoiding colored partitions of two elements in the pattern sense, arXiv preprint arXiv:1203.3786 [math.CO], 2012. - From N. J. A. Sloane, Sep 17 2012

Milan Janjic, Two Enumerative Functions

Tanya Khovanova, Recursive Sequences

Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992.

Simon Plouffe, 1031 Generating Functions and Conjectures, Université du Québec à Montréal, 1992.

Eric Weisstein's World of Mathematics, Even Number

Eric Weisstein's World of Mathematics, Hamiltonian Cycle

Eric Weisstein's World of Mathematics, Riemann Zeta Function Zeros

Wikipedia, Alkane

Index entries for "core" sequences

Index entries for linear recurrences with constant coefficients, signature (2,-1).

FORMULA

G.f.: 2*x/(1-x)^2.

E.g.f.: 2*x*exp(x). - Geoffrey Critzer, Aug 25 2012

G.f. with interpolated zeros: 2x^2/((1-x)^2 * (1+x)^2); e.g.f. with interpolated zeros: x*sinh(x). - Geoffrey Critzer, Aug 25 2012.

Inverse binomial transform of A036289, n*2^n. - Joshua Zucker, Jan 13 2006

a(0) = 0, a(1) = 2, a(n) = 2a(n-1) - a(n-2). - Jaume Oliver Lafont, May 07 2008

a(n) = Sum_{k=1..n} floor(6n/4^k + 1/2). - Vladimir Shevelev, Jun 04 2009

a(n) = A034856(n+1) - A000124(n) = A000217(n) + A005408(n) - A000124(n) = A005408(n) - 1. - Jaroslav Krizek, Sep 05 2009

a(n) = Sum_k>=0 {A030308(n,k)*A000079(k+1)}. - Philippe Deléham, Oct 17 2011

Digit sequence 22 read in base n-1. - Jason Kimberley, Oct 30 2011

a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Vincenzo Librandi, Dec 23 2011

a(n) = 2*n = product(2*sin(Pi*k/(2*n)), k=1..2*n-1), n>=0 (undefined product := 1). See an Oct 09 2013 formula contribution in A000027 with a reference. - Wolfdieter Lang, Oct 10 2013

From Ilya Gutkovskiy, Aug 19 2016: (Start)

Сonvolution of A007395 and A057427.

Sum_{n>=1} (-1)^(n+1)/a(n) = log(2)/2 = (1/2)*A002162 = (1/10)*A016655. (End)

EXAMPLE

G.f. = 2*x + 4*x^2 + 6*x^3 + 8*x^4 + 10*x^5 + 12*x^6 + 14*x^7 + 16*x^8 + ...

MAPLE

A005843 := n->2*n;

A005843:=2/(z-1)**2; # Simon Plouffe in his 1992 dissertation

MATHEMATICA

Range[0, 120, 2] (* Harvey P. Dale, Aug 16 2011 *)

PROG

(MAGMA) [ 2*n : n in [0..100]];

(R) seq(0, 200, 2)

(PARI) A005843(n) = 2*n

(Haskell)

a005843 = (* 2)

a005843_list = [0, 2 ..]  -- Reinhard Zumkeller, Feb 11 2012

CROSSREFS

a(n)=2*A001477(n). - Juri-Stepan Gerasimov, Dec 12 2009

Cf. A000027, A005408, A001358, A005843, A077553, A077554, A077555, A002024, A087112, A157888, A157889, A140811, A157872, A157909, A157910.

Moore lower bound on the order of a (k,g) cage: A198300 (square); rows: A000027 (k=2), A027383 (k=3), A062318 (k=4), A061547 (k=5), A198306 (k=6), A198307 (k=7), A198308 (k=8), A198309 (k=9), A198310 (k=10), A094626 (k=11); columns: A020725 (g=3), this sequence (g=4), A002522 (g=5), A051890 (g=6), A188377 (g=7). - Jason Kimberley, Oct 30 2011

Cf. A231200 (boustrophedon transform).

KEYWORD

nonn,easy,core,nice,changed

AUTHOR

N. J. A. Sloane

STATUS

approved

A000069 Odious numbers: numbers with an odd number of 1's in their binary expansion.
(Formerly M1031 N0388)
+20
245
1, 2, 4, 7, 8, 11, 13, 14, 16, 19, 21, 22, 25, 26, 28, 31, 32, 35, 37, 38, 41, 42, 44, 47, 49, 50, 52, 55, 56, 59, 61, 62, 64, 67, 69, 70, 73, 74, 76, 79, 81, 82, 84, 87, 88, 91, 93, 94, 97, 98, 100, 103, 104, 107, 109, 110, 112, 115, 117, 118, 121, 122, 124, 127, 128 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

This sequence and A001969 give the unique solution to the problem of splitting the nonnegative integers into two classes in such a way that sums of pairs of distinct elements from either class occur with the same multiplicities [Lambek and Moser]. Cf. A000028, A000379.

En français: les nombres impies.

Has asymptotic density 1/2, since exactly 2 of the 4 numbers 4k, 4k+1, 4k+2, 4k+3 have an even sum of bits, while the other 2 have an odd sum. - Jeffrey Shallit, Jun 04 2002

Nim-values for game of mock turtles played with n coins.

A115384(n) = number of odious numbers <= n; A000120(a(n)) = A132680(n). - Reinhard Zumkeller, Aug 26 2007

Indices of 1's in the Thue-Morse sequence A010060. - Tanya Khovanova, Dec 29 2008

For any positive integer m, the partition of the set of the first 2^m positive integers into evil ones E and odious ones O is a fair division for any polynomial sequence p(k) of degree less than m, that is, Sum_{k in E} p(k) = Sum_{k in O} p(k) holds for any polynomial p with deg(p)<m. - Pietro Majer, Mar 15 2009

For n>1 let b(n) = a(n-1). Then b(b(n)) = 2b(n). - Benoit Cloitre, Oct 07 2010

A000069(n)(mod 2) == A010060(n). - Robert G. Wilson v, Jan 18 2012

A005590(a(n)) > 0. - Reinhard Zumkeller, Apr 11 2012

A106400(a(n)) = -1. - Reinhard Zumkeller, Apr 29 2012

REFERENCES

E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982, see p. 433.

J. Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 22.

V. S. Shevelev, On some identities connected with the partition of the positive integers with respect to the Morse sequence, Izv. Vuzov of the North-Caucasus region, Nature sciences 4 (1997), 21-23 (Russian).

N. J. A. Sloane, A handbook of Integer Sequences, Academic Press, 1973 (including this sequence).

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

LINKS

N. J. A. Sloane, Table of n, a(n) for n = 1..10001

J.-P. Allouche and J. Shallit, The ring of k-regular sequences, II, Theoret. Computer Sci., 307 (2003), 3-29.

J.-P. Allouche, J. Shallit and G. Skordev, Self-generating sets, integers with missing blocks and substitutions, Discrete Math. 292 (2005) 1-15.

J.-P. Allouche, B. Cloitre, V. Shevelev, Beyond odious and evil, arXiv preprint arXiv:1405.6214 [math.NT], 2014.

J.-P. Allouche, B. Cloitre, V. Shevelev, Beyond odious and evil, Aequationes mathematicae, March 2015, pp 1-13.

E. Fouvry, C. Mauduit, Sommes des chiffres et nombres presque premiers, (French) [Sums of digits and almost primes] Math. Ann. 305 (1996), no. 3, 571--599. MR1397437 (97k:11029)

Maciej Gawron, and Maciej Ulas, On formal inverse of the Prouhet-Thue-Morse sequence, Discrete Mathematics 339.5 (2016): 1459-1470. Also arXiv preprintarXiv:1601.04840 [math.CO], 2016.

R. K. Guy, The unity of combinatorics, Proc. 25th Iranian Math. Conf, Tehran, (1994), Math. Appl 329 129-159, Kluwer Dordrecht 1995, Math. Rev. 96k:05001.

R. K. Guy, Impartial games, pp. 35-55 of Combinatorial Games, ed. R. K. Guy, Proc. Sympos. Appl. Math., 43, Amer. Math. Soc., 1991.

Sajed Haque, Jeffrey Shallit, Discriminators and k-Regular Sequences, arXiv:1605.00092 [cs.DM], 2016.

K. Jensen, Aesthetics and quality of numbers using the primety measure, Int. J. Arts and Technology, Vol. 7, Nos. 2/3, 2014.

C. Kimberling, Affinely recursive sets and orderings of languages, Discrete Math., 274 (2004), 147-160. [From N. J. A. Sloane, Jan 31 2012]

Tanya Khovanova, There are no coincidences, arXiv:1410.2193 [math.CO], 2014

J. Lambek and L. Moser, On some two way classifications of integers, Canad. Math. Bull. 2 (1959), 85-89.

M. D. McIlroy, The number of 1's in binary integers: bounds and extremal properties, SIAM J. Comput., 3 (1974), 255-261.

H. L. Montgomery, Ten Lectures on the Interface Between Analytic Number Theory and Harmonic Analysis, Amer. Math. Soc., 1996, p. 208.

D. J. Newman, A Problem Seminar, Problem 15 pp. 5; 15 Springer-Verlag NY 1982.

Vladimir Shevelev, Peter J. C. Moses, Tangent power sums and their applications, arXiv:1207.0404 [math.NT], 2012-2014. - From N. J. A. Sloane, Dec 17 2012

V. Shevelev and P. J. C. Moses, Tangent power sums and their applications, INTEGERS, 14(2014) #64.

V. Shevelev and P. J. C. Moses, A family of digit functions with large periods, arXiv:1209.5705 [math.NT], 2012

Eric Weisstein's World of Mathematics, Odious Number

Index entries for sequences related to binary expansion of n

Index entries for "core" sequences

FORMULA

G.f.: 1+Sum_[k>=0, t(2+2t+5t^2-t^4)/(1-t^2)^2 * Product_(l=0, k-1, 1-x^(2^l)), t=x^2^k]. - Ralf Stephan, Mar 25 2004

a(n+1) = 1/2 * (4*n + 1 + (-1)^A000120(n)). - Ralf Stephan, Sep 14 2003

Numbers n such that A010060(n) = 1. - Benoit Cloitre, Nov 15 2003

a(2*n+1) + a(2*n) = A017101(n) = 8*n+3. a(2*n+1) - a(2*n) gives the Thue-Morse sequence (1, 3 version): 1, 3, 3, 1, 3, 1, 1, 3, 3, 1, 1, 3, 1, ... A001969(n) + A000069(n) = A016813(n) = 4*n+1. - Philippe Deléham, Feb 04 2004

(-1)^a(n) = 2*A010060(n)-1. - Benoit Cloitre, Mar 08 2004

a(1) = 1; for n>1: a(2*n) = 6*n-3 -a(n), a(2*n+1) = a(n+1) + 2*n. - Corrected by Vladimir Shevelev, Sep 25 2011

For k>=1 and for every real (or complex) x, we have Sum_{i=1..2^k} (a(i)+x)^s = Sum_{i=1..2^k} (A001969(i)+x)^s, s=0..k.

For x=0, s<=k-1, it is known as Prouhet theorem (see: J.-P. Allouche and Jeffrey Shallit, The Ubiquitous Prouhet-Thue-Morse Sequence). - Vladimir Shevelev, Jan 16 2012

EXAMPLE

For k=2, x=0 and x=0.2 we respectively have 1^2 + 2^2 + 4^2 + 7^2 = 0^2 + 3^2 + 5^2 + 6^2 = 70;

(1.2)^2 + (2.2)^2 + (4.2)^2 + (7.2)^2 = (0.2)^2 + (3.2)^2 + (5.2)^2 + (6.2)^2 = 75.76;

for k=3, x=1.8, we have (2.8)^3 + (3.8)^3 + (5.8)^3 + (8.8)^3 + (9.8)^3 + (12.8)^3 + (14.8)^3 + (15.8)^3 = (1.8)^3 + (4.8)^3 + (6.8)^3 + (7.8)^3 + (10.8)^3 + (11.8)^3 + (13.8)^3 + (16.8)^3 = 11177.856. - Vladimir Shevelev, Jan 16 2012

MAPLE

s := proc(n) local i, j, k, b, sum, ans; ans := [ ]; j := 0; for i while j<n do sum := 0; b := convert(i, base, 2); for k to nops(b) do sum := sum+b[ k ]; od; if sum mod 2 = 1 then ans := [ op(ans), i ]; j := j+1; fi; od; RETURN(ans); end; t1 := s(100); A000069 := n->t1[n]; # s(k) gives first k terms.

is_A000069 := n -> type(add(i, i=convert(n, base, 2)), odd):

seq(`if`(is_A000069(i), i, NULL), i=0..40); # Peter Luschny, Feb 03 2011

MATHEMATICA

Select[Range[300], OddQ[DigitCount[ #, 2][[1]]] &] (* Stefan Steinerberger, Mar 31 2006 *)

a[ n_] := If[ n < 1, 0, 2 n - 1 - Mod[ Total @ IntegerDigits[ n - 1, 2], 2]]; (* Michael Somos, Jun 01 2013 *)

PROG

(PARI) {a(n) = if( n<1, 0, 2*n - 1 - subst( Pol(binary( n-1)), x, 1) % 2)}; /* Michael Somos, Jun 01 2013 */

(PARI) {a(n) = if( n<2, n==1, if( n%2, a((n+1)/2) + n-1, -a(n/2) + 3*(n-1)))}; /* Michael Somos, Jun 01 2013 */

(PARI) a(n)=2*n-1-hammingweight(n-1)%2 \\ Charles R Greathouse IV, Mar 22 2013

(MAGMA) [ n: n in [1..130] | IsOdd(&+Intseq(n, 2)) ]; // Klaus Brockhaus, Oct 07 2010

(Haskell)

a000069 n = a000069_list !! (n-1)

a000069_list = [x | x <- [0..], odd $ a000120 x]

-- Reinhard Zumkeller, Feb 01 2012

CROSSREFS

The basic sequences concerning the binary expansion of n are A000120, A000788, A000069, A001969, A023416, A059015.

Complement of A001969 (the evil numbers). Cf. A133009.

a(n) = 2*n+1-A010060(n)=A001969(n)+(-1)^A010060(n).

First differences give A007413.

Cf. A000773, A181155, A019568, A059009.

Note that A000079, A083420, A002042, A002089, A132679 are subsequences.

See A027697 for primes, also A230095.

KEYWORD

easy,core,nonn,nice,base

AUTHOR

N. J. A. Sloane

STATUS

approved

A006881 Squarefree semiprimes: Numbers that are the product of two distinct primes.
(Formerly M4082)
+20
224
6, 10, 14, 15, 21, 22, 26, 33, 34, 35, 38, 39, 46, 51, 55, 57, 58, 62, 65, 69, 74, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 166, 177, 178, 183, 185, 187, 194, 201, 202, 203, 205 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Numbers n such that phi(n) + sigma(n) = 2*(n+1). - Benoit Cloitre, Mar 02 2002

n such that tau(n) = omega(n)^omega(n). - Benoit Cloitre, Sep 10 2002

Could also be called 2-almost primes. - Rick L. Shepherd, May 11 2003

From the Goldston et al. reference's abstract: "lim inf [as n approaches infinity] [(a(n+1) - a(n))] <= 26. If an appropriate generalization of the Elliott-Halberstam Conjecture is true, then the above bound can be improved to 6." - Jonathan Vos Post, Jun 20 2005

A000005(a(n)^(k-1)) = A000290(k) for all k>0. - Reinhard Zumkeller, Mar 04 2007

The maximal number of consecutive integers in this sequence is 3 - there cannot be 4 consecutive integers because one of them would be divisible by 4 and therefore would not be product of distinct primes. There are several examples of 3 consecutive integers in this sequence. The first one is 33=3*11, 34=2*17, 35=5*7. - Matias Saucedo (solomatias(AT)yahoo.com.ar), Mar 15 2008

A109810(a(n)) = 4; A178254(a(n)) = 6. - Reinhard Zumkeller, May 24 2010

A056595(a(n)) = 3. - Reinhard Zumkeller, Aug 15 2011

a(n) = A096916(n) * A070647(n). - Reinhard Zumkeller, Sep 23 2011

Number of terms less than or equal to 10^k (A036351): 2, 30, 288, 2600, 23313, 209867, 1903878, 17426029, 160785135, 1493766851, ..., . - Robert G. Wilson v, Feb 07 2012

A211110(a(n)) = 3. - Reinhard Zumkeller, Apr 02 2012

Sum(n>=1, 1/a(n)^s ) = (1/2)*(P(s)^2-P(2*s)), where P is Prime Zeta. - Enrique Pérez Herrero, Jun 24 2012

Number of terms <= 10^k for k>=0 is A036351(k). - Robert G. Wilson v, Jun 26 2012

Are these the numbers n whose difference between the sum of proper divisors of n and the arithmetic derivative of n is equal to 1? - Omar E. Pol, Dec 19 2012

A050326(a(n)) = 2. - Reinhard Zumkeller, May 03 2013

sopf(a(n)) = a(n) - phi(a(n)) + 1 = sigma(a(n)) - a(n) - 1. - Wesley Ivan Hurt, May 18 2013

d(a(n)) = 4. Omega(a(n)) = 2. omega(a(n)) = 2. mu(a(n)) = 1. - Wesley Ivan Hurt, Jun 28 2013

A089233(a(n)) = 1. - Reinhard Zumkeller, Sep 04 2013

Intersection of A001358 and A030513. - Wesley Ivan Hurt, Sep 09 2013

A237114(n) (smallest semiprime k^prime(n)+1) is a term, for n != 2. - Jonathan Sondow, Feb 06 2014

a(n) are the reduced denominators of p2/p1 + p4/p3, where p1 != p2, p3 != p4, p1 != p3, and the p's are primes. In other words, (p2*p3 + p1*p4) never shares a common factor with p1*p3. - Richard R. Forberg, Mar 04 2015

Conjecture: The sums of two elements of a(n) forms a set that includes all primes >= 29 and all integers >= 83 (and many below 83). - Richard R. Forberg, Mar 04 2015

The (disjoint) union of this sequence and A001248 is A001358. - Jason Kimberley, Nov 12 2015

REFERENCES

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

LINKS

T. D. Noe, Table of n, a(n) for n = 1..10000

D. A. Goldston, S. W. Graham, J. Pimtz and Y. Yildirim, "Small Gaps Between Primes or Almost Primes", arXiv:math/0506067 [math.NT], March 2005.

Eric Weisstein's World of Mathematics, Semiprime

FORMULA

a(n) ~ n log n/log log n. - Charles R Greathouse IV, Aug 22 2013

MAPLE

N:= 1001: # to get all terms < N

Primes:= select(isprime, [2, seq(2*k+1, k=1..floor(N/2))]):

{seq(seq(p*q, q=Primes[1..ListTools:-BinaryPlace(Primes, N/p)]), p=Primes)} minus {seq(p^2, p=Primes)};

# Robert Israel, Jul 23 2014

MATHEMATICA

mx = 205; Sort@ Flatten@ Table[ Prime[n]*Prime[m], {n, Log[2, mx/3]}, {m, n + 1, PrimePi[ mx/Prime[n]]}] (* Robert G. Wilson v, Dec 28 2005, modified Jul 23 2014 *)

fQ[n_] := Last@# & /@ FactorInteger@ n == {1, 1}; Select[ Range[210], fQ] (* Robert G. Wilson v, Feb 07 2012 *)

PROG

(PARI) for(n=1, 214, if(bigomega(n)==2&&omega(n)==2, print1(n, ", "))) for(n=1, 214, if(bigomega(n)==2&&issquarefree(n), print1(n, ", ")))

(PARI) list(lim)=my(v=List()); forprime(p=2, sqrt(lim), forprime(q=p+1, lim\p, listput(v, p*q))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jul 20 2011

(Haskell)

a006881 n = a006881_list !! (n-1)

a006881_list = filter chi [1..] where

   chi n = p /= q && a010051 q == 1 where

      p = a020639 n

      q = n `div` p

-- Reinhard Zumkeller, Aug 07 2011

(Sage)

def A006881_list(n) :

    R = []

    for i in (6..n) :

        d = prime_divisors(i)

        if len(d) == 2 :

            if d[0]*d[1] == i :

                R.append(i)

    return R

A006881_list(205)  # Peter Luschny, Feb 07 2012

(MAGMA) [n: n in [1..210] | EulerPhi(n) + DivisorSigma(1, n) eq 2*(n+1)]; // Vincenzo Librandi, Sep 17 2015

CROSSREFS

Cf. A046386, A046387, A067885 (product of 4, 5 and 6 distinct primes, resp.)

Cf. A030229, A051709, A001221 (omega(n)), A001222 (bigomega(n)), A001358 (semiprimes), A005117 (squarefree), A007304 (squarefree 3-almost primes), A213952, A039833, A016105 (subsequences), A237114 (subsequence, n != 2).

Subsequence of A007422.

Cf. A259758 (subsequence), A036351.

KEYWORD

nonn,easy,nice,changed

AUTHOR

N. J. A. Sloane, Robert Munafo, Simon Plouffe

EXTENSIONS

Name expanded based on a comment of Rick L. Shepherd - Charles R Greathouse IV, Sep 16 2015

STATUS

approved

A016777 a(n) = 3n + 1. +20
190
1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, 37, 40, 43, 46, 49, 52, 55, 58, 61, 64, 67, 70, 73, 76, 79, 82, 85, 88, 91, 94, 97, 100, 103, 106, 109, 112, 115, 118, 121, 124, 127, 130, 133, 136, 139, 142, 145, 148, 151, 154, 157, 160, 163, 166, 169, 172, 175, 178, 181, 184, 187 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Numbers n such that the concatenation of the first n natural numbers is not divisible by 3. E.g., 16 is in the sequence because we have 123456789101111213141516 = 1 (mod 3).

Ignoring the first term, this sequence represents the number of bonds in a hydrocarbon: a(#of carbon atoms) = number of bonds. - Nathan Savir (thoobik(AT)yahoo.com), Jul 03 2003

n such that sum(k=0,n,binomial(n+k,n-k) mod 2) is even (cf. A007306). - Benoit Cloitre, May 09 2004

Hilbert series for twisted cubic curve. - Paul Barry, Aug 11 2006

If Y is a 3-subset of an n-set X then, for n>=3, a(n-3) is the number of 3-subsets of X having at least two elements in common with Y. - Milan Janjic, Nov 23 2007

a(n) = A144390 (1, 9, 23, 43, 69, ...) - A045944 (0,5,16,33,56, ...). From successive spectra of hydrogen atom. - Paul Curtz, Oct 05 2008

A145389(a(n)) = 1. - Reinhard Zumkeller, Oct 10 2008

Union of A035504, A165333 and A165336. - Reinhard Zumkeller, Sep 17 2009

Hankel transform of A076025. - Paul Barry, Sep 23 2009

From Jaroslav Krizek, May 28 2010: (Start)

a(n) = numbers k such that the antiharmonic mean of the first k positive integers is an integer.

A169609(a(n-1)) = 1. See A146535 and A169609. Complement of A007494.

See A005408 (odd positive integers) for corresponding values A146535(a(n)). (End)

Apart from the initial term, A180080 is a subsequence; cf. A180076. - Reinhard Zumkeller, Aug 14 2010

Also the maximum number of triangles that n + 2 noncoplanar points can determine in 3D space. - Carmine Suriano, Oct 08 2010

A089911(4*a(n)) = 3. - Reinhard Zumkeller, Jul 05 2013

The number of partitions of 6*n into at most 2 parts. - Colin Barker, Mar 31 2015

For n >=1, a(n)/2 is the proportion of oxygen for the stoichiometric combustion reaction of hydrocarbon CnH2n+2, e.g., one part propane (C3H8) requires 5 parts oxygen to complete its combustion. - Kival Ngaokrajang, Jul 21 2015

Exponents n>0 for which 1 + x^2 + x^n is reducible. - Ron Knott, Oct 13 2016

REFERENCES

W. Decker, C. Lossen, Computing in Algebraic Geometry, Springer, 2006, p. 22

L. B. W. Jolley, "Summation of Series", Dover Publications, 1961, p. 16.

Konrad Knopp, Theory and Application of Infinite Series, Dover, p. 269.

LINKS

Table of n, a(n) for n=0..62.

L. Euler, Observatio de summis divisorum p. 9.

L. Euler, An observation on the sums of divisors, arXiv:math/0411587 [math.HO], see p. 9.

Tanya Khovanova, Recursive Sequences

Konrad Knopp, Theorie und Anwendung der unendlichen Reihen, Berlin, J. Springer, 1922. (Original German edition of "Theory and Application of Infinite Series")

T. Mansour, Permutations avoiding a set of patterns from S_3 and a pattern from S_4, arXiv:math/9909019 [math.CO], 1999.

Luis Manuel Rivera, Integer sequences and k-commuting permutations, arXiv preprint arXiv:1406.3081, 2014

Index entries for linear recurrences with constant coefficients, signature (2,-1)

FORMULA

G.f.: (1+2*x)/(1-x)^2. a(n) = 3 + a(n-1).

sum(n=1, inf, (-1)^n/a(n)) = 1/3(Pi/sqrt(3) + log(2)). [Jolley] - Benoit Cloitre, Apr 05 2002

(1 + 4x + 7x^2 + 10x^3...) = (1 + 2x + 3x^2...)/(1 - 2x + 4x^2 - 8x^3...). - Gary W. Adamson, Jul 03 2003

E.g.f.: exp(x)*(1+3x). - Paul Barry, Jul 23 2003

a(n) = 2*a(n-1) - a(n-2); a(0)=1, a(1)=4. - Philippe Deléham, Nov 03 2008

a(n) = 6*n - a(n-1) - 1 (with a(0) = 1). - Vincenzo Librandi, Nov 20 2010

sum_{n>=0} 1/a(n)^2 = A214550. - R. J. Mathar, Jul 21 2012

E.g.f.: E(0), where E(k) = 1 + 3*x/(1 - 2*x/(2*x + 6*x*(k+1)/E(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jul 05 2013

G.f.: 1 + 4*x/(G(0) - 4*x), where G(k) = 1 + 4*x + 3*k*(x+1) -  x*(3*k+1)*(3*k+7)/G(k+1); (cont. fraction). - Sergei N. Gladkovskii, Jul 05 2013

a(n) = A238731(n+1,n) = (-1)^n*Sum_{k = 0..n} A238731(n,k)*(-5)^k. - Philippe Deléham, Mar 05 2014

Sum(i=0..n, a(i)-i) = A000290(n+1). - Ivan N. Ianakiev, Sep 24 2014

MAPLE

a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=a[n-1]+3 od: seq(a[n], n=1..63); # Zerinvary Lajos, Mar 16 2008

MATHEMATICA

Range[1, 199, 3] (* Vladimir Joseph Stephan Orlovsky, May 26 2011 *)

PROG

(MAGMA) [3*n+1 : n in [1..30]]; // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006

(Haskell)

a016777 = (+ 1) . (* 3)

a016777_list = [1, 4 ..]  -- Reinhard Zumkeller, Feb 28 2013, Feb 10 2012

(Maxima) A016777(n):=3*n+1$

makelist(A016777(n), n, 0, 30); /* Martin Ettl, Oct 31 2012 */

(PARI) a(n)=3*n+1 \\ Charles R Greathouse IV, Jul 28 2015

CROSSREFS

A016789(n) = 1 + a(n).

First differences of A000326.

Cf. A000290, A016933, A017569, A058183.

Row sums of A131033.

Complement of A007494. - Reinhard Zumkeller, Oct 10 2008

Cf. A051536 (lcm).

Cf. A007559 (partial products).

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane, Dec 11 1996

EXTENSIONS

Better description from T. D. Noe, Aug 15 2002

Partially edited by Joerg Arndt, Mar 11 2010

STATUS

approved

A005836 Numbers n whose base 3 representation contains no 2.
(Formerly M2353)
+20
159
0, 1, 3, 4, 9, 10, 12, 13, 27, 28, 30, 31, 36, 37, 39, 40, 81, 82, 84, 85, 90, 91, 93, 94, 108, 109, 111, 112, 117, 118, 120, 121, 243, 244, 246, 247, 252, 253, 255, 256, 270, 271, 273, 274, 279, 280, 282, 283, 324, 325, 327, 328, 333, 334, 336, 337, 351, 352 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

3 does not divide binomial(2s, s) if and only if s is a member of this sequence, where binomial(2s, s) = A000984(s) are the central binomial coefficients.

This is the lexicographically earliest increasing sequence of nonnegative numbers that contains no arithmetic progression of length 3. - Robert Craigen (craigenr(AT)cc.umanitoba.ca), Jan 29 2001

In the notation of A185256 this is the Stanley Sequence S(0,1). - N. J. A. Sloane, Mar 19 2010

Complement of A074940. - Reinhard Zumkeller, Mar 23 2003

Sums of distinct powers of 3. - Ralf Stephan, Apr 27 2003

Numbers n such that central trinomial coefficient A002426(n) == 1 (mod 3). - Emeric Deutsch and Bruce E. Sagan, Dec 04 2003

A039966(a(n)+1) = 1; A104406(n) = number of terms <= n.

Subsequence of A125292; A125291(a(n)) = 1 for n>1. - Reinhard Zumkeller, Nov 26 2006

Also final value of n - 1 written in base 2 and then read in base 3 and with finally the result translated in base 10. - Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Jun 23 2007

A081603(a(n)) = 0. - Reinhard Zumkeller, Mar 02 2008

a(n) modulo 2 is the Thue-Morse sequence A010060. - Dennis Tseng, Jul 16 2009

Also numbers such that the balanced ternary representation is the same as the base 3 representation. - Alonso del Arte, Feb 25 2011

Fixed point of the morphism: 0 -> 01; 1 -> 34; 2 -> 67; ...; n -> (3n)(3n+1), starting from a(1) = 0. - Philippe Deléham, Oct 22 2011

It appears that this sequence lists the values of n which satisfy the condition sum(binomial(n, k)^(2*j), k = 0..n) mod 3 <> 0, for any j, with offset 0. See Maple code. - Gary Detlefs, Nov 28 2011

Also, it follows from the above comment by Philippe Lallouet that the sequence must be generated by the rules: a(1) = 0, and if m is in the sequence then so are 3*m and 3*m + 1. - L. Edson Jeffery, Nov 20 2015

REFERENCES

R. K. Guy, Unsolved Problems in Number Theory, E10.

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

LINKS

David W. Wilson, Table of n, a(n) for n = 1..10000 a(1..1024) from T. D. Noe

David Applegate, Omar E. Pol and N. J. A. Sloane, The Toothpick Sequence and Other Sequences from Cellular Automata

J.-P. Allouche and J. Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197.

J.-P. Allouche and J. Shallit, The ring of k-regular sequences, Theoretical Computer Sci., 98 (1992), 163-197.

J.-P. Allouche, J. Shallit and G. Skordev, Self-generating sets, integers with missing blocks and substitutions, Discrete Math. 292 (2005) 1-15.

K. Dilcher and L. Ericksen, Hyperbinary expansions and Stern polynomials, Elec. J. Combin, 22, 2015, #P2.24.

P. Erdos, V. Lev, G. Rauzy, C. Sandor, A. Sarkozy, Greedy algorithm, arithmetic progressions, subset sums and divisibility, Discrete Math., 200 (1999), 119-135 (see Table 1).

J. L. Gerver and L. T. Ramsey, Sets of integers with no long arithmetic progressions generated by the greedy algorithm, Math. Comp., 33 (1979), 1353-1359.

Kathrin Kostorz et al., Distributed coupling complexity in a weakly coupled oscillatory network with associative properties, New J. Phys. 15 (2013), #083010; doi:10.1088/1367-2630/15/8/083010.

Clark Kimberling, Affinely recursive sets and orderings of languages, Discrete Math., 274 (2004), 147-160.

J. W. Layman, Some Properties of a Certain Nonaveraging Sequence, J. Integer Sequences, Vol. 2, 1999, #4.

R. A. Moy and D. Rolnick, Novel structures in Stanley sequences, Discrete Math., 339 (2016), 689-698. Also arXiv:1502.06013v1, 2015.

A. M. Odlyzko and R. P. Stanley, Some curious sequences constructed with the greedy algorithm, 1978, remark 1 (PDF, PS, TeX).

P. Pollack, Analytic and Combinatorial Number Theory Course Notes, p. 228. [?Broken link]

P. Pollack, Analytic and Combinatorial Number Theory Course Notes, p. 228.

Rolnick, David, and Praveen S. Venkataramana, On the growth of Stanley sequences, arXiv preprint arXiv:1408.4710 [math.CO], 2014.  Also Discrete Math., 338 (2015), 1928-1937. See page 1930 of the Disc. Math. version.

N. J. A. Sloane, Catalog of Toothpick and Cellular Automata Sequences in the OEIS

R. Stephan, Divide-and-conquer generating functions. I. Elementary sequences, arXiv:math/0307027 [math.CO], 2003.

R. Stephan, Some divide-and-conquer sequences ...

R. Stephan, Table of generating functions

Z. Sunic, Tree morphisms, transducers and integer sequences, arXiv:math/0612080 [math.CO], 2006.

B. Vasic, K. Pedagani and M. Ivkovic, High-rate girth-eight low-density parity-check codes on rectangular integer lattices, IEEE Transactions on Communications, Vol. 52, Issue 8 (2004), 1248-1252.

Eric Weisstein's World of Mathematics, Central Binomial Coefficient

FORMULA

Numbers n such that the coefficient of x^n is > 0 in prod (k >= 0, 1 + x^(3^k)). - Benoit Cloitre, Jul 29 2003

a(n+1) = sum( b(k)* 3^k ) for k = 0..m and n = sum( b(k)* 2^k ).

a(2n+1) = 3a(n+1), a(2n+2) = a(2n+1) + 1, a(0) = 0.

a(n+1) = 3*a(floor(n/2)) + n - 2*floor(n/2). - Ralf Stephan, Apr 27 2003

G.f.: x/(1-x) * Sum(k >= 0, 3^k*x^2^k/(1+x^2^k)). - Ralf Stephan, Apr 27 2003

a(n) = Sum_{k = 1..n-1} (1 + 3^A007814(k)) / 2. - Philippe Deléham, Jul 09 2005

If the offset were changed to zero, then: a(0) = 0, a(n+1) = f(a(n) + 1, f(a(n)+1) where f(x, y) = if x < 3 and x <> 2 then y else if x mod 3 = 2 then f(y+1, y+1) else f(floor(x/3), y). - Reinhard Zumkeller, Mar 02 2008

With offset a(0) = 0: a(n) = Sum_k >= 0 {A030308(n,k)*3^k}. - Philippe Deléham, Oct 15 2011

a(2^n) = A003462(n). - Philippe Deléham, Jun 06 2015

liminf a(n)/n^(log(3)/log(2)) = 1/2 and limsup a(n)/n^(log(3)/log(2)) = 1. - Gheorghe Coserea, Sep 13 2015

EXAMPLE

a(6) = 12 because 6 = 0*2^0 + 1*2^1 + 1*2^2 = 2+4 and 12 = 0*3^0 + 1*3^1 + 1*3^2 = 3 + 9.

This sequence regarded as a triangle with rows of lengths 1, 1, 2, 4, 8, 16, ...:

   0

   1

   3,  4

   9, 10, 12, 13

  27, 28, 30, 31, 36, 37, 39, 40

  81, 82, 84, 85, 90, 91, 93, 94, 108, 109, 111, 112, 117, 118, 120, 121

... - Philippe Deléham, Jun 06 2015

MAPLE

t:=(j, n)-> sum(binomial(n, k)^j, k=0..n):for i from 1 to 400 do if(t(4, i) mod 3 <>0) then print(i) fi od; # Gary Detlefs, Nov 28 2011

MATHEMATICA

Table[FromDigits[IntegerDigits[k, 2], 3], {k, 60}]

Select[Range[0, 400], DigitCount[#, 3, 2] == 0 &] (* Harvey P. Dale, Jan 04 2012 *)

Join[{0}, Accumulate[Table[(3^IntegerExponent[n, 2] + 1)/2, {n, 57}]]] (* IWABUCHI Yu(u)ki, Aug 01 2012 *)

PROG

(PARI) A=vector(100); for(n=2, #A, A[n]=if(n%2, 3*A[n\2+1], A[n-1]+1)); A \\ Charles R Greathouse IV, Jul 24 2012

(PARI) is(n)=while(n, if(n%3>1, return(0)); n\=3); 1 \\ Charles R Greathouse IV, Mar 07 2013

(PARI) a(n) = subst(Pol(binary(n-1)), 'x, 3);  \\ Gheorghe Coserea, Sep 13 2015

(Haskell)

a005836 n = a005836_list !! (n-1)

a005836_list = filter ((== 1) . a039966) [0..]

-- Reinhard Zumkeller, Jun 09 2012, Sep 29 2011

(Python)

def A005836(n):

....return int(format(n-1, 'b'), 3) # Chai Wah Wu, Jan 04 2015

CROSSREFS

a(n) = A005823(n)/2; a(n) = A003278(n)-1 = A033159(n)-2 = A033162(n)-3.

Cf. A005823, A032924, A054591, A007089, A081603, A081611, A000695, A007088, A033042-A033052, A074940, A083096. A002426, A003278, A004793, A055246, A062548, A081601, A089118, A121153, A170943, A185256.

For generating functions Prod_{k>=0} (1+a*x^(b^k)) for the following values of (a,b) see: (1,2) A000012 and A000027, (1,3) A039966 and A005836, (1,4) A151666 and A000695, (1,5) A151667 and A033042, (2,2) A001316, (2,3) A151668, (2,4) A151669, (2,5) A151670, (3,2) A048883, (3,3) A117940, (3,4) A151665, (3,5) A151671, (4,2) A102376, (4,3) A151672, (4,4) A151673, (4,5) A151674.

Row 3 of array A104257.

Summary of increasing sequences avoiding arithmetic progressions of specified lengths (the second of each pair is obtained by adding 1 to the first):

3-term AP: A005836 (>=0), A003278 (>0);

4-term AP: A005839 (>=0), A005837 (>0);

5-term AP: A020654 (>=0), A020655 (>0);

6-term AP: A020656 (>=0), A005838 (>0);

7-term AP: A020657 (>=0), A020658 (>0);

8-term AP: A020659 (>=0), A020660 (>0);

9-term AP: A020661 (>=0), A020662 (>0);

10-term AP: A020663 (>=0), A020664 (>0).

KEYWORD

nonn,nice,easy,base,tabf

AUTHOR

N. J. A. Sloane, Jeffrey Shallit

EXTENSIONS

Offset corrected by N. J. A. Sloane, Mar 02 2008

Edited by the Associate Editors of the OEIS, Apr 07 2009

STATUS

approved

A016825 Positive integers congruent to 2 mod 4: a(n) = 4n+2, for n >= 0. +20
142
2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62, 66, 70, 74, 78, 82, 86, 90, 94, 98, 102, 106, 110, 114, 118, 122, 126, 130, 134, 138, 142, 146, 150, 154, 158, 162, 166, 170, 174, 178, 182, 186, 190, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230, 234 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

COMMENTS

Twice the odd numbers, also called singly even numbers.

Numbers having equal numbers of odd and even divisors: A001227(a(n))=A000005(2*a(n)). - Reinhard Zumkeller, Dec 28 2003

Continued fraction for coth(1/2) = (e+1)/(e-1). The continued fraction for tanh(1/2) = (e-1)/(e+1) would be a(0) = 0, a(n) = A016825(n-1), n >= 1.

No solutions to a(n) = b^2 - c^2. - Henry Bottomley, Jan 13 2001

Apart from initial term(s), dimension of the space of weight 2n cuspidal newforms for Gamma_0( 70 ).

Sequence gives n such that 8 is the largest power of 2 dividing A003629(k)^n-1 for any k. - Benoit Cloitre, Apr 05 2002

n such that Sum_{d|n}(-1)^d) = A048272(n) = 0. - Benoit Cloitre, Apr 15 2002

Also n such that Sum_{d|n}phi(d)*mu(n/d) = A007431(n) = 0. - Benoit Cloitre, Apr 15 2002

Also n such that Sum_{d|n}(d/A00005(d))*mu(n/d) = 0, n such that Sum_{d|n}(A00005(d)/d)*mu(n/d) = 0. - Benoit Cloitre, Apr 19 2002

Solutions to phi(x) = phi(x/2); primorial numbers are here. - Labos Elemer, Dec 16 2002

Together with 1, numbers that are not the leg of a primitive Pythagorean triangle. - Lekraj Beedassy, Nov 25 2003

Maximum number of electrons in an atomic subshell with orbital quantum number l is 2(2l+1) since the magnetic quantum number m goes from -l to +l and the electron spin is either -1/2 or +1/2 for each m.

For n>0: complement of A107750 and A023416(a(n)-1) = A023416(a(n)) <> A023416(a(n)+1). - Reinhard Zumkeller, May 23 2005

Also the minimal value of Sum_{i=1..n+2}(p(i) - p(i+1))^2, where p(n+3) = p(1), as p ranges over all permutations of {1,2,...,n+2} (see the Mihai reference). Example: a(2)=10 because the values of the sum for the permutations of {1,2,3,4} are 10 (8 times), 12 (8 times) and 18 (8 times). - Emeric Deutsch, Jul 30 2005

Except for a(n)=2, numbers having 4 as an anti-divisor. - Alexandre Wajnberg, Oct 02 2005

This is also the number of polyacenes in carbon nanotubes. See page 413 equation 12 of the paper by I. Lukovits and D. Janezic. - Parthasarathy Nambi, Aug 22 2006

A139391(a(n)) = A006370(a(n)) = A005408(n). - Reinhard Zumkeller, Apr 17 2008

Also a(n) = (n-1) + n + (n+1) + (n+2), so a(n) and -a(n) are all the integers that are sums of four consecutive integers. - Rick L. Shepherd, Mar 21 2009

(e-1)/(e+1) = tanh(1/2). - Harry J. Smith, May 09 2009

The denominator in Pi/8 = 1/2 - 1/6 + 1/10 - 1/14 + 1/18 - 1/22 + .... - Mohammad K. Azarian, Oct 13 2011

A080736(a(n)) = 0. - Reinhard Zumkeller, Jun 11 2012

A007814(a(n)) = 1; A037227(a(n)) = 3. - Reinhard Zumkeller, Jun 30 2012

A214546(a(n)) = 0. - Reinhard Zumkeller, Jul 20 2012

Also, for a(n)>=6, the orders of the dihedral groups D_{2n+1} which are Frobenius groups. See A178498. - Bernard Schott, Dec 21 2012

Let D0 = {d0(n,i)}, i = 1..p, denote the set of the p even divisors of n and D1 = {d1(n,j)}, j = 1..q the set of the q odd divisors of n; then a(n) are the numbers such that Sum_{i=1..p} 1/phi(d0(i)) = Sum_{j=1..q} 1/phi(d1(j)). - Michel Lagneau, Dec 26 2014

This sequence gives the positive zeros of i^x = 0, x real, because i^x = exp(i*x*Pi/2). - Ilya Gutkovskiy, Aug 08 2015

REFERENCES

Mohammad K. Azarian, Problem 1218, Pi Mu Epsilon Journal, Vol. 13, No. 2, Spring 2010, p. 116. Solution published in Vol. 13, No. 3, Fall 2010, pp. 183-185.

H. Bass, Mathematics, Mathematicians and Mathematics Education, Bull. Amer. Math. Soc. (N.S.) 42 (2004), no. 4, 417-430.

A. Beiser, Concepts of Modern Physics, 2nd Ed., McGraw-Hill, 1973.

J. R. Goldman, The Queen of Mathematics, 1998, p. 70.

Granino A. Korn and Theresa M. Korn, Mathematical Handbook for Scientists and Engineers, McGraw-Hill Book Company, New York (1968).

LINKS

Harry J. Smith, Table of n, a(n) for n = 0..20000

Daniel Forgues, Number of electrons per filled orbital

Tanya Khovanova, Recursive Sequences

D. H. Lehmer, Continued fractions containing arithmetic progressions, Scripta Mathematica, 29 (1973): 17-24. [Annotated copy of offprint]

I. Lukovits and D. Janezic, Enumeration of conjugated circuits in nanotubes, J. Chem. Inf. Comput. Sci. 44 (2004), 410-414.

Vasile Mihai and Michael Woltermann, Problem 10725: The Smoothest and Roughest Permutations, Amer. Math. Monthly, 108 (March 2001), pp. 272-273.

William A. Stein, Dimensions of the spaces S_k^{new}(Gamma_0(N))

William A. Stein, The modular forms database

Eric Weisstein's World of Mathematics, Singly Even Number

Eric Weisstein's World of Mathematics, Square Number

G. Xiao, Contfrac

Index entries for continued fractions for constants

Index entries for linear recurrences with constant coefficients, signature (2,-1).

FORMULA

a(n) = 4*n + 2, for n >= 0.

a(n) = 2*A005408(n). - Lekraj Beedassy, Nov 28 2003

a(n) = A118413(n+1,2) for n>1. - Reinhard Zumkeller, Apr 27 2006

From Michael Somos, Apr 11 2007: (Start)

G.f.: 2* (1+x)/(1-x)^2.

E.g.f.: 2*(1+2*x)*exp(x).

a(n) = a(n-1) + 4.

a(-1-n) = -a(n). (End)

a(n) = 8*n - a(n-1) (with a(0)=2). - Vincenzo Librandi, Nov 20 2010

EXAMPLE

0.4621171572600097585023184... = 0 + 1/(2 + 1/(6 + 1/(10 + 1/(14 + ...)))).

2.1639534137386528487700040... = 2 + 1/(6 + 1/(10 + 1/(14 + 1/(18 + ...)))), i.e., CF for coth(1/2).

MATHEMATICA

Range[2, 500, 4] (* Vladimir Joseph Stephan Orlovsky, May 26 2011 *)

PROG

(MAGMA) [4*n+2 : n in [0..100] ];

(PARI) a(n)= 4*n+2

(PARI) allocatemem(932245000); default(realprecision, 180000); x=contfrac(tanh(1/2)); for (n=2, 20002, write("b016825.txt", n-2, " ", x[n])); \\ Harry J. Smith, May 09 2009

(Haskell)

a016825 = (+ 2) . (* 4)

a016825_list = [2, 6 ..]  -- Reinhard Zumkeller, Feb 14 2012

CROSSREFS

Cf. A107687. First differences of A001105.

Cf. A160327 = Decimal expansion.

Subsequence of A042963.

Essentially the complement of A042965.

KEYWORD

nonn,easy,nice,cofr

AUTHOR

N. J. A. Sloane

STATUS

approved

A035513 Wythoff array read by antidiagonals. +20
128
1, 2, 4, 3, 7, 6, 5, 11, 10, 9, 8, 18, 16, 15, 12, 13, 29, 26, 24, 20, 14, 21, 47, 42, 39, 32, 23, 17, 34, 76, 68, 63, 52, 37, 28, 19, 55, 123, 110, 102, 84, 60, 45, 31, 22, 89, 199, 178, 165, 136, 97, 73, 50, 36, 25, 144, 322, 288, 267, 220, 157, 118, 81, 58, 41, 27, 233, 521 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

T(0,0)=1, T(0,1)=2,...; y^2-x^2-xy<y if and only if there exist (i,j) with x=T(i,2j) and y=T(i,2j+1). - Claude Lenormand (claude.lenormand(AT)free.fr), Mar 17 2001

Inverse of sequence A064274 considered as a permutation of the nonnegative integers. - Howard A. Landman, Sep 25 2001

The Wythoff array W consists of all the Wythoff pairs (x(n),y(n)), where x=A000201 and y=A001950, so that W contains every positive integer exactly once. The differences T(i,2j+1)-T(i,2j) form the Wythoff difference array, A080164, which also contains every positive integer exactly once. - Clark Kimberling, Feb 08 2003

For n>2 the determinant of any n X n contiguous subarray of A035513 (as a square array) is 0. - Gerald McGarvey, Sep 18 2004

From Clark Kimberling, Nov 14 2007: (Start)

Except for initial terms in some cases:

(Row 1) = A000045

(Row 2) = A000032

(Row 3) = A006355

(Row 4) = A022086

(Row 5) = A022087

(Row 6) = A000285

(Row 7) = A022095

(Row 8) = A013655 (sum of Fibonacci and Lucas numbers)

(Row 9) = A022112

(Row 10-19) = A022113, A022120, A022121, A022379, A022130, A022382, A022088, A022136, A022137, A022089

(Row 20-28) = A022388, A022096, A022090, A022389, A022097, A022091, A022390, A022098, A022092

(Column 1) = A003622 = AA Wythoff sequence

(Column 2) = A035336 = BA Wythoff sequence

(Column 3) = A035337 = ABA Wythoff sequence

(Column 4) = A035338 = BBA Wythoff sequence

(Column 5) = A035339

(Column 6) = A035340

Main diagonal = A020941. (End)

The Wythoff array is the dispersion of the sequence given by floor(n*x+x-1), where x=(golden ratio). See A191426 for a discussion of dispersions. -Clark Kimberling, Jun 03 2011

If u and v are finite sets of numbers in a row of the Wythoff array such that (product of all the numbers in u) = (product of all the numbers in v), then u = v. See A160009 (row 1 products), A274286 (row 2), A274287 (row 3), A274288 (row 4). - Clark Kimberling, Jun 17 2016

REFERENCES

J. H. Conway, Posting to Math Fun Mailing List, Nov 25 1996.

C. Kimberling, "Stolarsky interspersions," Ars Combinatoria 39 (1995) 129-138.

LINKS

Alois P. Heinz, Table of n, a(n) for n = 1..5151

J. H. Conway, Allan Wechsler, Marc LeBrun, Dan Hoey, N. J. A. Sloane, On Kimberling Sums and Para-Fibonacci Sequences, Correspondence and Postings to Math-Fun Mailing List, Nov 1996 to Jan 1997.

Larry Ericksen and Peter G. Anderson, Patterns in differences between rows in k-Zeckendorf arrays, The Fibonacci Quarterly, Vol. 50, February 2012. - N. J. A. Sloane, Jun 10 2012

C. Kimberling, Interspersions

C. Kimberling, The Zeckendorf array equals the Wythoff array, Fibonacci Quarterly 33 (1995) 3-8.

C. Kimberling, Complementary equations and Wythoff Sequences, JIS 11 (2008) 08.3.3.

C. Kimberling and K. B. Stolarsky, Slow Beatty sequences, devious convergence, and partitional divergence, Amer. Math. Monthly, 123 (No. 2, 2016), 267-273.

Casey Mongoven, Sonification of multiple Fibonacci-related sequences, Annales Mathematicae et Informaticae, 41 (2013) pp. 175-192.

N. J. A. Sloane, My favorite integer sequences, in Sequences and their Applications (Proceedings of SETA '98).

N. J. A. Sloane, Classic Sequences

Sam Vandervelde, On the divisibility of Fibonacci sequences by primes of index two, The Fibonacci Quarterly 50.3 (2012): 207-216. See Figure 1.

Eric Weisstein's World of Mathematics, Wythoff Array

Index entries for sequences that are permutations of the natural numbers

FORMULA

T(n, k) = Fib(k+1)*floor[n*tau]+Fib(k)*(n-1) where tau = (sqrt(5)+1)/2 = A001622 and Fib(n) = A000045(n). - Henry Bottomley, Dec 10 2001

T(n,-1) = n-1. T(n,0) = floor(n*tau). T(n,k) = T(n,k-1) + T(n,k-2) for k>=1. - R. J. Mathar, Sep 03 2016

EXAMPLE

The Wythoff array begins:

   1    2    3    5    8   13   21   34   55   89  144 ...

   4    7   11   18   29   47   76  123  199  322  521 ...

   6   10   16   26   42   68  110  178  288  466  754 ...

   9   15   24   39   63  102  165  267  432  699 1131 ...

  12   20   32   52   84  136  220  356  576  932 1508 ...

  14   23   37   60   97  157  254  411  665 1076 1741 ...

  17   28   45   73  118  191  309  500  809 1309 2118 ...

  19   31   50   81  131  212  343  555  898 1453 2351 ...

  22   36   58   94  152  246  398  644 1042 1686 2728 ...

  25   41   66  107  173  280  453  733 1186 1919 3105 ...

  27   44   71  115  186  301  487  788 1275 2063 3338 ...

  ...

The extended Wythoff array has two extra columns, giving the row number n and A000201(n), separated from the main array by a vertical bar:

0     1  |   1    2    3    5    8   13   21   34   55   89  144   ...

1     3  |   4    7   11   18   29   47   76  123  199  322  521   ...

2     4  |   6   10   16   26   42   68  110  178  288  466  754   ...

3     6  |   9   15   24   39   63  102  165  267  432  699 1131   ...

4     8  |  12   20   32   52   84  136  220  356  576  932 1508   ...

5     9  |  14   23   37   60   97  157  254  411  665 1076 1741   ...

6    11  |  17   28   45   73  118  191  309  500  809 1309 2118   ...

7    12  |  19   31   50   81  131  212  343  555  898 1453 2351   ...

8    14  |  22   36   58   94  152  246  398  644 1042 1686 2728   ...

9    16  |  25   41   66  107  173  280  453  733 1186 1919 3105   ...

10   17  |  27   44   71  115  186  301  487  788 1275 2063 3338   ...

11   19  |  30   49   79   ...

12   21  |  33   54   87   ...

13   22  |  35   57   92   ...

14   24  |  38   62   ...

15   25  |  40   65   ...

16   27  |  43   70   ...

17   29  |  46   75   ...

18   30  |  48   78   ...

19   32  |  51   83   ...

20   33  |  53   86   ...

21   35  |  56   91   ...

22   37  |  59   96   ...

23   38  |  61   99   ...

24   40  |  64   ...

25   42  |  67   ...

26   43  |  69   ...

27   45  |  72   ...

28   46  |  74   ...

29   48  |  77   ...

30   50  |  80   ...

31   51  |  82   ...

32   53  |  85   ...

33   55  |  88   ...

34   56  |  90   ...

35   58  |  93   ...

36   59  |  95   ...

37   61  |  98   ...

38   63  |     ...

   ...

Each row of the extended Wythoff array also satisfies the Fibonacci recurrence, and may be extended to the left using this recurrence backwards.

MAPLE

W:= proc(n, k) Digits:= 100; (Matrix([n, floor((1+sqrt(5))/2* (n+1))]). Matrix([[0, 1], [1, 1]])^(k+1))[1, 2] end: seq(seq(W(n, d-n), n=0..d), d=0..10); # Alois P. Heinz, Aug 18 2008

A035513 := proc(r, c)

    option remember;

    if c = 1 then

        A003622(r) ;

    else

        A022342(1+procname(r, c-1)) ;

    end if;

end proc: # R. J. Mathar, Jan 25 2015

MATHEMATICA

W[n_, k_] := Fibonacci[k + 1] Floor[n*GoldenRatio] + (n - 1) Fibonacci[k]; Table[ W[n - k + 1, k], {n, 12}, {k, n, 1, -1}] // Flatten

PROG

(PARI) T(n, k)=(n+sqrtint(5*n^2))\2*fibonacci(k+1) + (n-1)*fibonacci(k)

for(k=0, 9, for(n=1, k, print1(T(n, k+1-n)", "))) \\ Charles R Greathouse IV, Mar 09 2016

CROSSREFS

See comments above for more cross-references.

Cf. A003622, A064274 (inverse), A083412 (transpose), A000201, A001950, A080164, A003603, A265650.

KEYWORD

nonn,tabl,easy,nice

AUTHOR

N. J. A. Sloane

EXTENSIONS

Extended Wythoff array added by N. J. A. Sloane, Mar 07 2016

STATUS

approved

A187224 Rank transform of the sequence floor(3*n/2). +20
108
1, 3, 5, 7, 8, 11, 12, 14, 16, 18, 19, 21, 23, 25, 27, 29, 30, 32, 34, 36, 38, 40, 41, 43, 45, 47, 48, 51, 52, 54, 56, 58, 60, 61, 63, 65, 67, 69, 70, 72, 74, 76, 78, 80, 81, 83, 85, 87, 89, 91, 92, 94, 96, 98, 100, 102, 103, 105, 107, 109, 110, 113, 114, 116, 118, 120, 121, 123, 125, 127, 129, 131, 132, 135, 136, 138, 140, 142, 143, 145, 147, 149, 151, 153, 154, 156, 158, 160, 162, 163, 165, 167, 169, 171, 172, 175, 176, 178, 180, 182, 183, 185, 187, 189, 191, 193, 194, 196, 198, 200 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Complement of A187225.

The notion of the rank transform of a sequence is introduced as follows.  Suppose that a=(a(n)), for n>=1, is a nondecreasing sequence of nonnegative integers, where a(1)<=1, and suppose that b=(b(n)), for n>=1, is an increasing sequence of positive integers.

Define h(1)=a(1), and for n>1, define h(n)=the number of numbers b(i) satisfying a(n-1)<=b(i)<a(n).

Define r(1)=1, and for n>1, define r(n)=b(n-1)+h(n)+1.

The sequence r is the adjusted rank sequence when a and b are jointly ranked, with a(i) before b(j) when a(i)=b(j).  (For a discussion of adjusted joint rank sequences, see A186219 and A186350.)

If r(n)=b(n) for all n>=1, we call r the rank transform of a and denote it by R(a).  To summarize,

  (1)  initial values: r(1)=1, h(1)=a(1);

  (2)  counting function: h(n)= # r(i) in the half-open

       interval [a(n-1),a(n));

  (3)  recurrence:  r(n)=r(n-1)+h(n)+1.

Assuming a unbounded, let c be the number of a(i)<=1, let c(1)=c+1, and for n>1, let c(n) be the rank of r(n) when all the numbers a(i)<=r(n) and r(1),...,r(n-1), r(n) are jointly ranked.  Then, clearly, a(n)<=r(n)<=c(n) for n>=1, and the sequences r and c are a complementary pair.

What conditions on the sequence a will ensure that R(a) exists?  That is, what conditions will ensure that the counting function in (2) can be determined inductively, so that the recurrence (3) can be used to self-generate the sequence r?  The answer is this:  a(n)<=c(n-1)+1; viz., if a(n)>c(n-1)+1, then c(n-1)+1=r(n), but then a(n)>r(n), a contradiction, but if a(n)<=c(n-1)+1, there is no such obstacle.

Examples:

R(A000012)=A000027

R(A000027)=A000201, the lower Wythoff sequence

R(A004526)=A026367

R(A005408)=A005408

Returning now to a and b as above, let (r(1,k)) be the adjusted joint rank sequence (AJRS) of a and b, with a(i) before b(j) when a(i)=b(j).  Let (r(2,k)) be the AJRS of a and (r(1,k)); and inductively, let (r(n,k)) be the AJRS of a and (r(n-1,k)).  If R(a) exists, then the limit of (r(n,k)) is R(a).

Thus, any choice of initial sequence b can be used to determine the first thousand terms of R(a).  In the Mathematica program below, b=(1,2,3,4,...)=A000027.

LINKS

Table of n, a(n) for n=1..110.

EXAMPLE

a... 1..3..4..6..7...9...10..12..13..15..16..18..19..

r... 1..3..5..7..8...11..12..14..16..18..19..21..23..

c... 2..4..6..9..10..13..15..17..20..22..24..26..28..

h... 1..1..1..1..0...2...0...1...1...1...0...1...1...

The sequences which converge to R(a), starting with

a=A187224 and b=A000027:

a(k)....1..3..4..6..7...9...10..12..13..15...

b(k)....1..2..3..4..5...6...7...8...9...10...

r(1,k)..1..4..6..9..11..14..16..19..21..24...

r(2,k)..1..3..4..6..8...9...11..13..14..16...

r(3,k)..1..3..5..7..9...11..13..15..16..19...

r(4,k)..1..3..5..7..8...10..12..14..15..17...

r(5,k)..1..3..5..7..8...11..12..14..16..18...

MATHEMATICA

seqA=Table[Floor[3*n/2], {n, 1, 220}]     (* A032766 *)

seqB=Table[n, {n, 1, 120}];               (* A000027 *)

jointRank[{seqA_, seqB_}]:={Flatten@Position[#1, {_, 1}], Flatten@Position[#1, {_, 2}]}&[Sort@Flatten[{{#1, 1}&/@seqA, {#1, 2}&/@seqB}, 1]];

limseqU=FixedPoint[jointRank[{seqA, #1[[1]]}]&, jointRank[{seqA, seqB}]][[1]]                     (* A187224 *)

Complement[Range[Length[seqA]], limseqU] (* A187225 *)

(* by Peter J. C. Moses, Mar 07 2011 *)

CROSSREFS

Cf. A186219, A186350, A187225.

KEYWORD

nonn

AUTHOR

Clark Kimberling, Mar 07 2011

STATUS

approved

A006370 Image of n under the '3x+1' map.
(Formerly M3198)
+20
100
4, 1, 10, 2, 16, 3, 22, 4, 28, 5, 34, 6, 40, 7, 46, 8, 52, 9, 58, 10, 64, 11, 70, 12, 76, 13, 82, 14, 88, 15, 94, 16, 100, 17, 106, 18, 112, 19, 118, 20, 124, 21, 130, 22, 136, 23, 142, 24, 148, 25, 154, 26, 160, 27, 166, 28, 172, 29, 178, 30, 184, 31, 190, 32, 196, 33 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

The 3x+1 or Collatz problem is as follows: start with any number n. If n is even, divide it by 2, otherwise multiply it by 3 and add 1. Do we always reach 1? This is an unsolved problem. It is conjectured that the answer is yes.

The Krasikov-Lagarias paper shows that at least N^0.84 of the positive numbers <N fall into the 4-2-1 cycle of the 3x+1 problem. This is far short of what we think is true, that all positive numbers fall into this cycle, but it is a step. - Richard Schroeppel, May 01 2002

Also A016957 and A000027 interleaved. - Omar E. Pol, Jan 16 2014

a(n) is the image of a(2*n) under the 3*x+1 map. - L. Edson Jeffery, Aug 17 2014

REFERENCES

R. K. Guy, Unsolved Problems in Number Theory, E16.

J. C. Lagarias, ed., The Ultimate Challenge: The 3x+1 Problem, Amer. Math. Soc., 2010.

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

LINKS

T. D. Noe, Table of n, a(n) for n=1..1000

Darrell Cox, The 3n + 1 Problem: A Probabilistic Approach, Journal of Integer Sequences, Vol. 15 (2012), #12.5.2.

I. Krasikov and J. C. Lagarias, Bounds for the 3x+1 Problem using Difference Inequalities, arXiv:math/0205002 [math.NT], 2002.

J. C. Lagarias, The 3x+1 problem and its generalizations, Amer. Math. Monthly, 92 (1985), 3-23.

J. C. Lagarias, The set of rational cycles for the 3x+1 problem, Acta Arithmetica, LVI (1990), pp. 33-53.

J. C. Lagarias, The 3x+1 Problem: An Annotated Bibliography (1963-2000), arXiv:math/0309224 [math.NT], 2003-2011.

J. C. Lagarias, The 3x+1 Problem: an annotated bibliography, II (2000-2009), arXiv:math/0608208 [math.NT], 2006-2012.

E. Roosendaal, On the 3x+1 problem

Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992.

Simon Plouffe, 1031 Generating Functions and Conjectures, Université du Québec à Montréal, 1992.

Eric Weisstein's World of Mathematics, Collatz Problem

Wikipedia, Collatz conjecture

Index entries for sequences related to 3x+1 (or Collatz) problem

Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).

FORMULA

G.f.: (4x+x^2+2x^3) / (1-x^2)^2.

a(n) = (1/4)(7n+2-(-1)^n(5n+2)). - Benoit Cloitre, May 12 2002

a(n) = ((n mod 2)*2 + 1)*n/(2 - (n mod 2)) + (n mod 2). - Reinhard Zumkeller, Sep 12 2002

a(n) = A014682(n+1) * A000034(n). - R. J. Mathar, Mar 09 2009

a(n) = a(a(2*n)) = -A001281(-n) for all n in Z. - Michael Somos, Nov 10 2016

E.g.f.: (2 + x)*sinh(x)/2 + 3*x*cosh(x). - Ilya Gutkovskiy, Dec 20 2016

EXAMPLE

G.f. = 4*x + x^2 + 10*x^3 + 2*x^4 + 16*x^5 + 3*x^6 + 22*x^7 + 4*x^8 + 28*x^9 + ...

MAPLE

f := n-> if n mod 2 = 0 then n/2 else 3*n+1; fi;

A006370:=(4+z+2*z**2)/(z-1)**2/(1+z)**2; # Simon Plouffe in his 1992 dissertation; uses offset 0

MATHEMATICA

f[n_]:=If[EvenQ[n], n/2, 3n+1]; Table[f[n], {n, 50}] (* Geoffrey Critzer, Jun 29 2013 *)

LinearRecurrence[{0, 2, 0, -1}, {4, 1, 10, 2}, 70] (* Harvey P. Dale, Jul 19 2016 *)

PROG

(PARI) for(n=1, 100, print1((1/4)*(7*n+2-(-1)^n*(5*n+2)), ", "))

(PARI) A006370(n)=if(n%2, 3*n+1, n/2) \\ Michael B. Porter, May 29 2010

(Haskell)

a006370 n | m /= 0    = 3 * n + 1

          | otherwise = n' where (n', m) = divMod n 2

-- Reinhard Zumkeller, Oct 07 2011

(Python)

def A006370(n):

....q, r = divmod(n, 2)

....return 3*n+1 if r else q # Chai Wah Wu, Jan 04 2015

(MAGMA) [(1/4)*(7*n+2-(-1)^n*(5*n+2)): n in [1..70]]; // Vincenzo Librandi, Dec 20 2016

CROSSREFS

Cf. A139391, A016945, A005408, A016825, A082286, A070165.

A006577 gives number of steps to reach 1.

Cf. A001281.

KEYWORD

nonn,nice,easy

AUTHOR

N. J. A. Sloane

EXTENSIONS

More terms from Larry Reeves (larryr(AT)acm.org), Apr 27 2001

STATUS

approved

page 1 2 3 4 5 6 7 8 9 10 ... 727

Search completed in 1.309 seconds

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified January 8 21:33 EST 2017. Contains 280444 sequences.