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 61-70 of 245 results. Next

A109022 Integers with mutual residues of 2 or more.

Original entry on oeis.org

3, 5, 8, 14, 23, 38, 44, 53, 59, 62, 68, 74, 83, 122, 134, 143, 158, 164, 173, 179, 188, 194, 203, 218, 227, 242, 263, 278, 284, 293, 302, 314, 338, 362, 374, 383, 398, 404, 422, 428, 443, 452, 458, 467, 479, 482, 503, 509, 524, 539, 542, 548, 554, 563, 578
Offset: 1

Views

Author

Seppo Mustonen, Aug 18 2005

Keywords

Comments

This is the special case k=2 of sequences with mutual k-residues. In general, a(1)=k+1 and a(n)=min{m | m>a(n-1), mod(m,a(i))>=k, i=1,...,n-1}. k=0 gives natural numbers A000027 and k=1 prime numbers A000040.

Examples

			The fourth term is 14 since mod(9,3)=0, mod(10,3)=1, mod(11,5)=1,
mod(12,3)=0, mod(13,3)=1 but mod(14,3)=2, mod(14,5)=4, mod(14,8)=6.
		

Crossrefs

Programs

  • Maple
    res_seq:=proc(a::array(1,nonnegint),k,n::nonnegint) local i,j,m,f; a[1]:=k+1; for i from 2 to n do m:=a[i-1]+1; f:=1; while f=1 do j:=1; while j=k do j:=j+1; od; if j=i then a[i]:=m; f:=0; else m:=m+1; fi; od; od; end; a:=array(1..57,[]); res_seq(a,2,57); print(a);
  • Mathematica
    seq[k_, n_] := Module[{a, i, j, m, f}, a = Table[0, {n}]; a[[1]] = k+1; For[i = 2, i <= n, i++, m = a[[i-1]]+1; f = 1; While[f == 1, j = 1; While[j < i && Mod[m, a[[j]]] >= k, j = j+1]; If[j == i, a[[i]] = m; f = 0, m = m+1]]]; a];
    seq[2, 57] (* Jean-François Alcover, Oct 05 2022, after Maple code *)

A037096 Periodic vertical binary vectors computed for powers of 3: a(n) = Sum_{k=0 .. (2^n)-1} (floor((3^k)/(2^n)) mod 2) * 2^k.

Original entry on oeis.org

1, 2, 0, 204, 30840, 3743473440, 400814250895866480, 192435610587299441243182587501623263200, 2911899996313975217187797869354128351340558818020188112521784134070351919360
Offset: 0

Author

Antti Karttunen, Jan 29 1999

Keywords

Comments

This sequence can be also computed with a recurrence that does not explicitly refer to 3^n. See the C program.
Conjecture: For n >= 3, each term a(n), when considered as a GF(2)[X] polynomial, is divisible by the GF(2)[X] polynomial (x + 1) ^ A055010(n-1). If this holds, then for n >= 3, a(n) = A048720(A136386(n), A048723(3,A055010(n-1))).

Examples

			When powers of 3 are written in binary (see A004656), under each other as:
  000000000001 (1)
  000000000011 (3)
  000000001001 (9)
  000000011011 (27)
  000001010001 (81)
  000011110011 (243)
  001011011001 (729)
  100010001011 (2187)
it can be seen that the bits in the n-th column from the right can be arranged in periods of 2^n: 1, 2, 4, 8, ... This sequence is formed from those bits: 1, is binary for 1, thus a(0) = 1. 01, reversed is 10, which is binary for 2, thus a(1) = 2, 0000 is binary for 0, thus a(2)=0, 000110011, reversed is 11001100 = A007088(204), thus a(3) = 204.
		

References

  • S. Wolfram, A New Kind of Science, Wolfram Media Inc., (2002), p. 119.

Crossrefs

Cf. A036284, A037095, A037097, A136386 for related sequences.
Cf. also A004642, A265209, A265210 (for 2^n written in base 3).

Programs

  • Maple
    a(n) := sum( 'bit_n(3^i, n)*(2^i)', 'i'=0..(2^(n))-1);
    bit_n := (x, n) -> `mod`(floor(x/(2^n)), 2);

Formula

a(n) = Sum_{k=0 .. A000225(n)} (floor(A000244(k)/(2^n)) mod 2) * 2^k.
Other identities and observations:
For n >= 2, a(n) = A000215(n-1)*A037097(n) = A048720(A037097(n), A048723(3, A000079(n-1))).

Extensions

Entry revised by Antti Karttunen, Dec 29 2007
Name changed and the example corrected by Antti Karttunen, Dec 05 2015

A051158 Decimal expansion of Sum_{n >= 0} 1/(2^2^n+1).

Original entry on oeis.org

5, 9, 6, 0, 6, 3, 1, 7, 2, 1, 1, 7, 8, 2, 1, 6, 7, 9, 4, 2, 3, 7, 9, 3, 9, 2, 5, 8, 6, 2, 7, 9, 0, 6, 4, 5, 4, 6, 2, 3, 6, 1, 2, 3, 8, 4, 7, 8, 1, 0, 9, 9, 3, 2, 6, 2, 1, 4, 4, 2, 4, 5, 9, 9, 6, 0, 9, 1, 0, 8, 9, 9, 7, 7, 4, 8, 8, 6, 0, 8, 8, 8, 9, 9, 3, 6, 1, 9, 1, 8, 4, 6, 4, 6, 4, 4, 0, 7, 4
Offset: 0

Author

Robert Lozyniak (11(AT)onna.com)

Keywords

Examples

			0.59606317211782167942...
		

Crossrefs

Terms in continued fraction: A159243. - Enrique Pérez Herrero, Nov 17 2009

Programs

  • Mathematica
    RealDigits[Sum[1/(2^2^n + 1), {n, 0, 10}], 10, 111][[1]] (* Robert G. Wilson v, Jul 03 2014 *)
  • PARI
    /* divisionless routine from fxtbook */
    s2(y, N=7)=
    { local(in, y2, A); /* as powerseries correct to order = 2^N-1 */
        in = 1; /* 1+y+y^2+y^3+...+y^(2^k-1) */
        A = y; for(k=2, N, in *= (1+y); y *= y; A += y*(in + A); );
        return( A ); }
    a=0.5*s2(0.5) /* computation of the constant 0.596063172117821... */
    /* Joerg Arndt, Apr 15 2010 */
    
  • PARI
    suminf(n=0, 1/(2^2^n+1)) \\ Michel Marcus, May 15 2020

Formula

Equals (1/2) * Sum_{k>=1} A000120(k)/2^k (S. Audinarayana Moorthy, 1974). - Amiram Eldar, May 15 2020
Equals 1 - Sum_{n>=1} A007814(n)/2^n = 2/3 - Sum_{n>=1} A007814(n)/4^n = 3/5 - Sum_{n>=1} A007814(n)/16^n. - Amiram Eldar, Nov 06 2020

A087046 Algebraic order of r_n, the value of r in the logistic map that corresponding to the onset of the period 2^n-cycle.

Original entry on oeis.org

1, 2, 12, 240, 65280, 4294901760, 18446744069414584320, 340282366920938463444927863358058659840, 115792089237316195423570985008687907852929702298719625575994209400481361428480
Offset: 1

Author

Eric W. Weisstein, Aug 04 2003

Keywords

Crossrefs

Cf. A051179 (partial sums).

Programs

  • Mathematica
    Table[If[n <= 1, 1, 2^(2^(n - 1)) - 2^(2^(n - 2))], {n, 1, 10}] (* Cheng Zhang, Apr 02 2012 *)
  • PARI
    a(n) = 1<<(1<<(n-1)) - 1<<(1<<(n-2)); \\ Kevin Ryde, Jan 18 2024

Formula

a(n) = 2^(2^(n - 1)) - 2^(2^(n - 2)) with n>1, a(1)=1. - Cheng Zhang, Apr 02 2012
Sum_{n>=1} 1/a(n) = 1 + A346192. - Amiram Eldar, Jul 18 2021

Extensions

More terms from Cheng Zhang, Apr 03 2012

A119563 Define F(n) = 2^(2^n)+1 = n-th Fermat number, M(n) = 2^n-1 = the n-th Mersenne number. Then a(n) = F(n)+M(n)-1 = 2^(2^n) + 2^n - 1.

Original entry on oeis.org

2, 5, 19, 263, 65551, 4294967327, 18446744073709551679, 340282366920938463463374607431768211583, 115792089237316195423570985008687907853269984665640564039457584007913129640191
Offset: 0

Author

Cino Hilliard, May 31 2006

Keywords

Comments

The first 5 entries are primes. Are there infinitely many primes in this sequence?

Examples

			F(2) = 2^(2^2)+1 = 17, M(2) = 2^2-1 = 3, F(2)+ M(2) - 1 = 19
		

Programs

  • PARI
    fm3(n) = for(x=0,n,y=2^(2^x)+2^x-1;print1(y","))

Formula

a(n) = A119561(n)-2=A000215(n)+A000225(n)-1. - R. J. Mathar, Apr 22 2007

Extensions

Edited by N. J. A. Sloane, Jun 03 2006

A129802 Possible bases for Pepin's primality test for Fermat numbers.

Original entry on oeis.org

3, 5, 6, 7, 10, 12, 14, 20, 24, 27, 28, 39, 40, 41, 45, 48, 51, 54, 56, 63, 65, 75, 78, 80, 82, 85, 90, 91, 96, 102, 105, 108, 112, 119, 125, 126, 130, 147, 150, 156, 160, 164, 170, 175, 180, 182, 192, 204, 210, 216, 224, 238, 243, 245, 250, 252, 260, 291, 294, 300
Offset: 1

Author

Max Alekseyev, Jun 14 2007, corrected Dec 29 2007. Thanks to Ant King for pointing out an error in the earlier version of this sequence

Keywords

Comments

Prime elements of this sequence are given by A102742.
From Jianing Song, May 15 2024: (Start)
Let m be an odd number and ord(2,m) = 2^r*d be the multiplicative order of 2 modulo m, where d is odd, then 2^2^n + 1 is congruent to one of 2^2^r + 1, 2^2^(r+1) + 1, ..., 2^2^(r+ord(2,d)-1) + 1 modulo m, so it suffices to check these ord(2,d) numbers.
Note that if m > 1, then m does not divide 2^2^n + 1 for n >= r, otherwise we would have 2^(2^n*d) = (2^ord(2,m))^2^(n-r) == 1 (mod m) and 2^(2^n*d) = (2^2^n)^d == (-1)^d == -1 (mod m). As a result, m is a term if and only if the Jacobi symbol ((2^2^n + 1)/m) is equal to -1 for m = r, r+1, ..., r+ord(2,d)-1.
By definition, a squarefree number that is a product of elite primes (A102742) or anti-elite primes (A128852) is a term if and only if its number of elite factors is odd. But a squarefree term can have factors that are neither elite nor anti-elite, the smallest being 551 = 19*29. (End)

Examples

			For n >= 2, we have 2^2^n + 1 == 170, 461, 17, 257, 519, 539 (mod 551) respectively for n == 0, 1, 2, 3, 4, 5 (mod 6). As we have (170/551) = (461/551) = (17/551) = (257/551) = (519/551) = (539/551) = -1, 551 is a term. - _Jianing Song_, May 19 2024
		

Programs

  • PARI
    { isPepin(n) = local(s,S=Set(),t); n\=2^valuation(n,2); s=Mod(3,n); while( !setsearch(S,s), S=setunion(S,[s]); s=(s-1)^2+1); t=s; until( t==s, if( kronecker(lift(t),n)==1, return(0)); t=(t-1)^2+1);1 }
    for(n=2,1000,if(isPepin(n),print1(n,", ")))
    
  • PARI
    for(b=2, 300, k=b/2^valuation(b, 2); if(k>1, i=logint(k, 2); m=Mod(2, k); z=znorder(m); e=znorder(Mod(2, z/2^valuation(z, 2))); t=0; for(c=1, e, if(kronecker(lift(m^2^(i+c))+1, k)==-1, t++, break)); if(t==e, print1(b, ", ")))); \\ Arkadiusz Wesolowski, Sep 22 2021
    
  • PARI
    isA129802(n) = n = (n >> valuation(n,2)); my(d = znorder(Mod(2, n)), StartPoint = valuation(d, 2), LengthTest = znorder(Mod(2, d >> StartPoint))); for(i = StartPoint, StartPoint + LengthTest - 1, if(kronecker(lift(Mod(2, n)^2^i + 1), n) == 1, return(0))); 1 \\ Jianing Song, May 19 2024

Formula

A positive integer 2^k*m, where m is odd and k >= 0, belongs to this sequence iff the Jacobi symbol (F_n/m) = 1 for only a finite number of Fermat numbers F_n = A000215(n).

A135590 Numbers k such that k^2 + 1 is a Sarrus number (pseudoprime to base 2).

Original entry on oeis.org

216, 948, 1560, 4872, 8208, 9828, 18200, 29640, 37024, 65536, 89550, 283800, 535920, 592956, 649800, 825930, 1042320, 1382400, 1536220, 3688230, 4215120, 4321800, 5103210, 19078930, 21415680, 24471720, 214067490, 435457620, 535019100
Offset: 1

Author

Jason Earls, Feb 25 2008

Keywords

Comments

Note that A000215(5) corresponds to a(10), and A000215(6) corresponds to a(33), and in general when A000215(n) is composite, this sequence has corresponding entry. - Jeppe Stig Nielsen, Mar 26 2016

Crossrefs

Programs

  • Mathematica
    fQ[n_] := ( !PrimeQ[n^2 + 1] && PowerMod[2, n^2, n^2 + 1] == 1); lst = {}; Do[ If[ fQ@ n, AppendTo[lst, n]], {n, 2, 440000000, 2}]; lst (* Robert G. Wilson v, Apr 18 2008 *)
  • PARI
    is(n) = {Mod(2, n)^(n-1)==1 && !ispseudoprime(n) && n > 1};
    for(n=1, 1e10, if(is(n^2+1), print1(n, ", "))); \\ Altug Alkan, Mar 26 2016

Extensions

More terms from Robert G. Wilson v, Apr 18 2008

A152155 Minimal residues of Pepin's Test for Fermat Numbers using the base 3.

Original entry on oeis.org

0, -1, -1, -1, -1, 10324303, -6586524273069171148, 110780954395540516579111562860048860420, 5864545399742183862578018016183410025465491904722516203269973267547486512819
Offset: 0

Author

Dennis Martin (dennis.martin(AT)dptechnology.com), Nov 27 2008

Keywords

Comments

For n>=1 the Fermat Number F(n) is prime if and only if 3^((F(n) - 1)/2) is congruent to -1 (mod F(n)).
Any positive integer k for which the Jacobi symbol (k|F(n)) is -1 can be used as the base instead.

Examples

			a(4) = 3^(32768) (mod 65537) = 65536 = -1 (mod F(4)), therefore F(4) is prime.
a(5) = 3^(2147483648) (mod 4294967297) = 10324303 (mod F(5)), therefore F(5) is composite.
		

References

  • M. Krizek, F. Luca & L. Somer, 17 Lectures on Fermat Numbers, Springer-Verlag NY 2001, pp. 42-43.

Programs

  • Maple
    f:= proc(n) local F;
       F:= 2^(2^n) + 1;
       `mods`(3 &^ ((F-1)/2), F)
    end proc:
    seq(f(n), n=0..10); # Robert Israel, Dec 19 2016
  • PARI
    a(n)=centerlift(Mod(3,2^(2^n)+1)^(2^(2^n-1))) \\ Jeppe Stig Nielsen, Dec 19 2016

Formula

a(n) = 3^((F(n) - 1)/2) (mod F(n)), where F(n) is the n-th Fermat Number, using the symmetry mod (so (-F(n)-1)/2 < a(n) < (F(n)-1)/2).

A185121 Smallest prime factor of 10^(2^n) + 1.

Original entry on oeis.org

11, 101, 73, 17, 353, 19841, 1265011073, 257, 10753, 1514497, 1856104284667693057, 106907803649, 458924033, 3635898263938497962802538435084289
Offset: 0

Author

Sergio Pimentel, Jan 22 2012

Keywords

Comments

10^k+1 can only be prime if k is a power of 2. So far the only known primes of this form are a(0) = 11 and a(1) = 101. [Edited by M. F. Hasler, Aug 03 2019]
a(n) >= 2^(n+1)+1; we have a(n) = 2^(n+1)+1 for n=3, n=7, and n=15.
a(14) > 10^16. - Max Alekseyev, Jun 28 2013
From the Keller link a(15)-a(20) = 65537, 8257537, 175636481, 639631361, 70254593, 167772161. - Ray Chandler, Dec 27 2013

Examples

			For n=2, a(2)=73 since 10^(2^2) + 1 = 10001 = 73 * 137.
		

Crossrefs

Essentially the same as A102050. - Sean A. Irvine, Feb 17 2013

Programs

  • Mathematica
    Table[With[{k = 2^n}, FactorInteger[10^k + 1]][[1, 1]], {n, 0, 13, 1}] (* Vincenzo Librandi, Jul 23 2013 *)
  • PARI
    a(n) = factor(10^(2^n)+1)[1, 1] \\ Michel Marcus, May 30 2013

Formula

a(n) = A038371(2^n). - M. F. Hasler, Jul 30 2019

A063486 a(n) = 2^(2^n) + 5.

Original entry on oeis.org

7, 9, 21, 261, 65541, 4294967301, 18446744073709551621, 340282366920938463463374607431768211461, 115792089237316195423570985008687907853269984665640564039457584007913129639941
Offset: 0

Author

Jason Earls, Jul 28 2001

Keywords

References

  • D. M. Burton, Elementary Number Theory, Allyn and Bacon Inc., Boston, MA, 1976, p. 238.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, Example 5.1 on page 153.

Crossrefs

Programs

  • Mathematica
    2^2^Range[0, 10] + 5 (* Paolo Xausa, Apr 17 2024 *)
  • PARI
    for(n=0,8,print1(2^(2^n)+5, ", "))
    
  • PARI
    { for (n=0, 11, write("b063486.txt", n, " ", 2^(2^n) + 5) ) } \\ Harry J. Smith, Aug 23 2009
    
  • SageMath
    [2**2**n + 5 for n in (0..8)] # Stefano Spezia, Jul 20 2025
Previous Showing 61-70 of 245 results. Next