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.

A007395 Constant sequence: the all 2's sequence.

This page as a plain text file.
%I A007395 M0208 #174 Aug 09 2025 07:41:46
%S A007395 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
%T A007395 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
%U A007395 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
%N A007395 Constant sequence: the all 2's sequence.
%C A007395 Continued fraction for 1 + sqrt(2). - _Philippe Deléham_, Nov 14 2006
%C A007395 a(n) = A213999(n,1). - _Reinhard Zumkeller_, Jul 03 2012
%C A007395 The least witness function W(k) is defined for odd composite numbers k. The sequence W(k) does not have its own entry in the OEIS because W(k) = 2 for all k with 9 <= k < 2047; then W(2047)=3. Cf. A089105. - _N. J. A. Sloane_, Sep 17 2014
%C A007395 a(n) = A254858(n-1,1). - _Reinhard Zumkeller_, Feb 09 2015
%C A007395 a(n) = number of permutations of length n+2 having exactly one ascent such that the first element the permutation is 2. - _Ran Pan_, Apr 20 2015
%C A007395 With alternating signs, this is the sequence of determinants of the 3 X 3 matrices m with m(i,j) = Fibonacci(n+i+j-2)^2. - _Michel Marcus_, Dec 23 2015
%C A007395 For p = prime(n+2), a(n) = ord_p(H_(p-1)), where ord_p denotes the p-adic valuation and H_i = 1 + 1/2 + ... + 1/i is a harmonic sum, except for n = 1944 and n = 157504, where ord_p(H_(p-1)) = 3, and any other term of A088164 that may exist (see Conrad link). The sequence a(n) = ord_p(H_(p-1)) does not have its own entry in the OEIS. - _Felix Fröhlich_, Mar 16 2016
%C A007395 This sequence is the only infinite bounded sequence of positive integers such that a(n) = (a(n-1) + a(n-2)) / gcd(a(n-1), a(n-2)) for all n >= 2. - _Bernard Schott_, Dec 28 2018
%D A007395 Titu Andreescu and Dorin Andrica, Number Theory, Birkhäuser, 2009, from 1999 Russian Mathematical Olympiad, p. 347.
%D A007395 Paulo Ribenboim, My Numbers, My Friends: Popular Lectures on Number Theory, Springer-Verlag, NY, 2000, p. 6.
%D A007395 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A007395 25th All-Russian Mathematical Olympiad, <a href="http://imomath.com/othercomp/Rus/RusMO99.pdf">Grade 10, Problem 2</a>, p. 2, 1999.
%H A007395 Tobias Boege and Thomas Kahle, <a href="https://arxiv.org/abs/1902.11260">Construction Methods for Gaussoids</a>, arXiv:1902.11260 [math.CO], 2019.
%H A007395 Keith Conrad, <a href="http://www.math.uconn.edu/~kconrad/blurbs/ugradnumthy/padicharmonicsum.pdf">The p-adic growth of harmonic sums</a>
%H A007395 Daniele A. Gewurz and Francesca Merola, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL6/Gewurz/gewurz5.html">Sequences realized as Parker vectors of oligomorphic permutation groups</a>, J. Integer Seqs., Vol. 6, 2003.
%H A007395 R. H. Hardin, <a href="/A151801/a151801.txt">Binary arrays with both rows and cols sorted, symmetries</a>
%H A007395 Tanya Khovanova, <a href="http://www.tanyakhovanova.com/RecursiveSequences/RecursiveSequences.html">Recursive Sequences</a>
%H A007395 Mihai Prunescu, <a href="https://arxiv.org/abs/2406.06436">On other two representations of the C-recursive integer sequences by terms in modular arithmetic</a>, arXiv:2406.06436 [math.NT], 2024. See p. 18.
%H A007395 Mihai Prunescu and Lorenzo Sauras-Altuzarra, <a href="https://arxiv.org/abs/2405.04083">On the representation of C-recursive integer sequences by arithmetic terms</a>, arXiv:2405.04083 [math.LO], 2024. See p. 16.
%H A007395 Mihai Prunescu and Joseph M. Shunia, <a href="https://arxiv.org/abs/2502.16928">On modular representations of C-recursive integer sequences</a>, arXiv:2502.16928 [math.NT], 2025. See p. 5.
%H A007395 Aram Tangboonduangjit and Thotsaporn Thanatipanonda, <a href="http://arxiv.org/abs/1512.07025">Determinants Containing Powers of Generalized Fibonacci Numbers</a>, arXiv:1512.07025 [math.CO], 2015.
%H A007395 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/HamiltonianCycle.html">Hamiltonian Cycle</a>
%H A007395 Dominika Závacká, Cristina Dalfó, and Miquel Angel Fiol, <a href="https://ceur-ws.org/Vol-3792/paper19.pdf">Integer sequences from k-iterated line digraphs</a>, CEUR: Proc. 24th Conf. Info. Tech. - Appl. and Theory (ITAT 2024) Vol 3792, 156-161. See p. 161, Table 2.
%H A007395 <a href="/index/Di#divseq">Index to divisibility sequences</a>
%H A007395 <a href="/index/Rea#recur1">Index entries for recurrences a(n) = k*a(n - 1) +/- a(n - 2)</a>
%H A007395 <a href="/index/Rec#order_01">Index entries for linear recurrences with constant coefficients</a>, signature (1).
%F A007395 G.f.: 2/(1-x), and e.g.f.: 2*e^x. - _Mohammad K. Azarian_, Dec 22 2008
%F A007395 a(n) = A000005(A000040(n)). - _Omar E. Pol_, Feb 28 2018
%F A007395 a(n) = A002061(n) - A165900(n). - _Torlach Rush_, Feb 21 2019
%t A007395 Table[2, {105}]
%o A007395 (PARI) a(n) = 2 \\ _Charles R Greathouse IV_, Apr 07 2012
%o A007395 (Haskell)
%o A007395 a007395 = const 2
%o A007395 a007395_list = repeat 2  -- _Reinhard Zumkeller_, May 07 2012
%o A007395 (Maxima) makelist(2,n,0,30); /* _Martin Ettl_, Nov 09 2012 */
%o A007395 (Python)
%o A007395 def A007395(n): return 2 # _Chai Wah Wu_, Nov 10 2022
%Y A007395 Cf. A000004, A000012, A002061, A010701, A089105, A165900.
%Y A007395 Cf. A213999, A254858.
%K A007395 nonn,easy
%O A007395 1,1
%A A007395 _N. J. A. Sloane_