cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 77 results. Next

A099679 Least m such that repunit R_m is a multiple of A045572(n) (i.e., odd numbers not divisible by 5).

Original entry on oeis.org

1, 3, 6, 9, 2, 6, 16, 18, 6, 22, 27, 28, 15, 6, 3, 6, 5, 21, 46, 42, 48, 13, 18, 58, 60, 18, 33, 66, 35, 8, 6, 13, 81, 41, 84, 44, 6, 15, 96, 18, 4, 34, 53, 108, 3, 112, 18, 48, 22, 15, 42, 21, 130, 18, 8, 46, 138, 6, 42, 148, 75, 144, 78, 39, 66, 81, 166, 78, 18, 43, 174, 178
Offset: 1

Views

Author

Lekraj Beedassy, Oct 26 2004

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1}, While[ Mod[(10^k - 1)/9, n] != 0, k++ ]; k]; f /@ Select[ 2Range[ 90] - 1, Mod[ #, 5] != 0 &] (* Robert G. Wilson v, Oct 27 2004 *)
  • PARI
    A(n)={ \\ Least m such that n | R_m
        my(f=factor(n),s=1,t);
        for(i=1,#f[,1],
            if(f[i,1]==3,
                t=3
            ,
                t=Mod(10,9*f[i,1]);
                fordiv(f[i,1]-1,d,
                    if(t^d==1,t=d;break)
                )
            );
            t*=f[i,1]^(f[i,2]-1);
            s=lcm(s,t)
        );
        s
    };
    a(n)=A(10*(n>>2)+[-1, 1, 3, 7][n%4+1]) \\ Least m such that A045572(n) | R_m
    \\ Charles R Greathouse IV, Jul 31 2011

Extensions

Corrected and extended by Robert G. Wilson v, Oct 27 2004

A258190 Smallest prime not appearing earlier that ends with A045572(n).

Original entry on oeis.org

11, 3, 7, 19, 211, 13, 17, 419, 421, 23, 127, 29, 31, 233, 37, 139, 41, 43, 47, 149, 151, 53, 157, 59, 61, 163, 67, 269, 71, 73, 277, 79, 181, 83, 487, 89, 191, 193, 97, 199, 101, 103, 107, 109, 2111, 113, 1117, 3119, 3121, 1123, 4127, 1129, 131, 4133, 137, 4139, 2141, 2143, 5147, 11149, 1151, 1153, 4157, 4159, 2161, 1163, 167, 3169
Offset: 1

Views

Author

Vladimir Shevelev, May 23 2015

Keywords

Comments

Using Dirichlet's theorem, we conclude that every term exists. So the sequence is a permutation of the odd primes other than 5. Indeed, an odd prime p other than 5 is either in its natural place in A045572 or appears earlier than that.

Crossrefs

Programs

  • Maple
    r:= -1: Used:= 'Used':
    for n from 1 to 1000 do
      r:= r+2;
      if r mod 5 = 0 then r:= r+2 fi;
      d:= 10^(1+ilog10(r));
      for x from r by d do
        if isprime(x) and not assigned(Used[x]) then
          a[n]:= x;
          Used[x]:= true;
          break
        fi
      od
    od:
    seq(a[n],n=1..1000); # Robert Israel, May 27 2015
  • PARI
    \\with first line from A045572 by Charles R Greathouse IV
    a(n) = {n = 10*(n>>2)+[-1, 1, 3, 7][n%4+1]; my(d = digits(n),m = matrix(#d + 1, 2), w=0); m[1,2] = d[#d] - 10; for(i = 2, matsize(m)[1], m[i,1]=10^(i-2)*d[#d-i+2] + m[i-1,1]; if(m[i-1,1] == m[i,1],m[i,2]=m[i-1,2], j=m[i,1]==m[i-1,2]; while(!isprime(10^(i-1)*j+m[i,1]), j++); m[i,2]=10^(i-1)*j+m[i,1]));m[matsize(m)[1],2]} \\ David A. Corneth, May 25 2015
    
  • Python
    from sympy import isprime
    def aupton(terms):
        alst, aset = [], set()
        for n in range(1, terms+1):
            ending = 2*n - 1 + (n+1)//4 * 2 # A045572
            i, pow10 = ending, 10**len(str(ending))
            while i in aset or not isprime(i): i += pow10
            alst.append(i); aset.add(i)
        return alst
    print(aupton(68)) # Michael S. Branicky, Nov 03 2021

Formula

a(n) >= A045572(n). The equality holds iff A045572(n) is a prime that did not already appear as a(k), k

A213605 Lesser of a pair (x,y) of consecutive terms of A045572 (numbers coprime to 2*5), both semiprimes and such that the prime factors of x are adjacent primes to the factors of y.

Original entry on oeis.org

403, 1003, 110203, 118003, 418307, 429491, 439097, 559003, 1239869, 1887239, 2481463, 2502977, 3381403, 3693419, 5646257, 6120403, 6586003, 6954767, 7042661, 8350003, 11305093, 13083403, 13760203, 17297519, 21159419
Offset: 1

Author

M. F. Hasler, Jun 15 2012

Keywords

Comments

Within the subset A045572 of numbers ending in 1, 3, 7 or 9, i.e., excluding numbers having 2 or 5 as prime factor, we look for two consecutive elements (x,y) which are both semiprimes and whose prime factors are "adjacent" primes, i.e., if x=p(i)*p(j), then we require y=p(i +/- 1)*p(j +/- 1).

Examples

			a(1) = 403 because (403,407) are such that 403=13*31 and 407=11*37, (11,13) and (31,37) being consecutive primes.
a(2) = 1003 because (1003,1007) are such that 1003=17*59 and 1007=19*53, where (17,19) and (53,59) are pairs of subsequent primes.
		

Crossrefs

Cf. A213606 (the greater ("y") of the pair of semiprimes).

A088074 Number of times A045572(n) is concatenated with itself in A088073.

Original entry on oeis.org

2, 1, 3, 3, 1, 21, 2097, 963, 1859, 824, 8812, 1668
Offset: 1

Author

Amarnath Murthy, Sep 22 2003

Keywords

Comments

a(7) > 1000. - David Wasserman, Jul 01 2005
a(13) > 10000. - Michael S. Branicky, Oct 09 2024

Examples

			The term corresponding to 9 is 3 as 999 is the corresponding term in A088073.
		

Crossrefs

Cf. A088073.

Extensions

Offset corrected and a(7)-a(12) from Michael S. Branicky, Oct 08 2024

A111479 a(n) = least positive number such that (2 Concat Concat_{k=1}^n Repeat(A045572(n), a(n))) is a prime. A045572 = odd numbers not divisible by 5.

Original entry on oeis.org

2, 1, 4, 11, 3, 617, 96, 1213, 1965
Offset: 1

Author

Amarnath Murthy, Aug 05 2005

Keywords

Comments

Concat is the operator that concatenates two numbers as decimal strings and Repeat returns the number obtained by concatenating the first argument to itself the second argument number of times.

Examples

			21 is not a prime, but 211 is, so a(1)=2.
211,2113,21137777 are all primes. 21137777 is a prime obtained as 2 followed by two 1's, one 3 and four 7's, so a(2) = 4.
		

Extensions

Edited by Franklin T. Adams-Watters, Aug 29 2006.
Corrected and extended by Max Alekseyev, May 21 2009

A213606 Greater of a pair (x,y) of consecutive terms of A045572 which are both semiprimes and such that the prime factors of x are adjacent primes to the factors of y.

Original entry on oeis.org

407, 1007, 110207, 118007, 418309, 429493, 439099, 559007, 1239871, 1887241, 2481467, 2502979, 3381407, 3693421, 5646259, 6120407, 6586007, 6954769, 7042663, 8350007, 11305097, 13083407, 13760207, 17297521, 21159421
Offset: 1

Author

M. F. Hasler, Jun 15 2012

Keywords

Comments

Within the sequence A045572 of numbers ending in 1, 3, 7 or 9 (i.e., excluding numbers having 2 or 5 as prime factor), we look for two consecutive elements (x,y) which are both semiprimes and whose prime factors are "adjacent" primes, i.e., if x=p(i)*p(j), then we require y=p(i +/- 1)*p(j +/- 1).

Examples

			a(1) = 407 is the second member of the pair (403,407) which is such that 403=13*31 and 407=11*37, (11,13) and (31,37) being pairs of consecutive primes. This is the smallest pair having these properties.
a(2) = 1007 because (1003,1007) is the second smallest pair of consecutive numbers among those ending in 1,3,7 or 9, which are both semiprimes and such that 1003=17*59 and 1007=19*53, where (17,19) and (53,59) are pairs of consecutive primes.
		

Crossrefs

Cf. A213605 (the lesser ("x") of the pair of semiprimes).

A333448 Smallest positive divisibility coefficient of A045572(n).

Original entry on oeis.org

1, 1, 5, 1, 10, 4, 12, 2, 19, 7, 19, 3, 28, 10, 26, 4, 37, 13, 33, 5, 46, 16, 40, 6, 55, 19, 47, 7, 64, 22, 54, 8, 73, 25, 61, 9, 82, 28, 68, 10, 91, 31, 75, 11, 100, 34, 82, 12, 109, 37, 89, 13, 118, 40, 96, 14, 127, 43, 103, 15, 136, 46, 110, 16, 145, 49, 117
Offset: 1

Author

Ivan Stoykov, Mar 21 2020

Keywords

Comments

The sequence was generated in an attempt to create a universal divisibility test. Namely, taking the last digit of the number inspected, multiplying it by a number (the "divisibility coefficient"), and adding it to the inspected number without the last digit. Then, if the result is divisible by the number we are checking, so is our original number. This test works only for numbers coprime to 10, hence the sequence is based on A045572. The sequence lists the smallest positive divisibility coefficients of the members of A045572.
a(n) may equivalently be defined as the multiplicative inverse of 10 modulo A045572(n). - Ely Golden, Mar 27 2024

Examples

			For example, let us check whether 21 is divisible by 7. First, we take off the last digit, 1. Since 7 is the third member of A045572, its divisibility coefficient is the third member of this sequence, namely 5. Then we multiply 5 times 1 to obtain 5, and we add it to the original number without the last digit, in our case, 2. We get 7, and since it is clearly divisible by 7, so is 21.
		

Crossrefs

Cf. A045572.

Programs

  • Mathematica
    Array[# - (# Mod[PowerMod[#, 3, 10], 10] - 1)/10 &[1/2*(5*# + Mod[3*# + 2, 4] - 4)] &, 67] (* Michael De Vlieger, Oct 05 2020 *)
  • PARI
    lista(nn) = {for (n=1, nn, if (gcd(n,10) == 1, my(m=n % 10, k=n\10, x); if (m == 1, x = 9*k+1); if (m == 3, x = 3*k+1); if (m == 7, x = 7*k+5); if (m == 9, x = k+1); print1(x, ", ");););} \\ Michel Marcus, May 04 2020
    
  • Python
    def a(n):
        u = 10*((n-1) // 4) + [1, 3, 7, 9][(n-1) % 4]
        return pow(10, -1, u) + (u == 1)
    print(*(a(i) for i in range(1,101)), sep=", ")
    # Ely Golden, Mar 27 2024

Formula

The sequence can be defined piecewise: 9m+1 for numbers of the form 10m+1; 3m+1 for numbers of the form 10m+3; 7m+5 for numbers of the form 10m+7 and m+1 for numbers of the form 10m+9.
From Lorenzo Sauras Altuzarra, Sep 29 2020: (Start)
a(n) = 1/10 - (1 - 2*(floor((n + 1)/4) + n))*(1 - (1 + (floor(16*9^n/205) mod 9))/10).
a(n) = b(n) - (((b(n) mod 10)^3 mod 10)*b(n) - 1)/10, where b(n) = A045572(n). (End)

Extensions

More terms from Michel Marcus, May 04 2020

A334495 Position of prime(n) in A045572, a(1) = a(3) = 0.

Original entry on oeis.org

0, 2, 0, 3, 5, 6, 7, 8, 10, 12, 13, 15, 17, 18, 19, 22, 24, 25, 27, 29, 30, 32, 34, 36, 39, 41, 42, 43, 44, 46, 51, 53, 55, 56, 60, 61, 63, 66, 67, 70, 72, 73, 77, 78, 79, 80, 85, 90, 91, 92, 94, 96, 97, 101, 103, 106, 108, 109, 111, 113, 114, 118, 123, 125, 126
Offset: 1

Author

Michael De Vlieger, Aug 27 2020

Keywords

Comments

A045572 contains the positive numbers coprime to 10.
Nondivisor primes p (i.e., all primes except p | 10, that is, 2 or 5) belong to one of four residues r (i.e., 1, 3, 7, 9) in the reduced residue system mod 10. Therefore all primes aside from 2 and 5 appear in A045572. On account of this fact, one may use A045572 as a sort of prime sieve. This use is less efficient than searching for primes aside from 2 and 3 amid numbers that are +/-1 (mod 6), i.e., in A007310, and slightly more efficient than searching for primes aside from 2 amid the odd numbers, but in line with the common (decimal) base.

Examples

			a(1) = a(3) = 0 by definition, since 2 and 5 are not in A045572.
a(2) = 2 since A045572(2) = 3, a(10) = 12 since prime(10) = 29 = A045572(12), etc.
		

Crossrefs

Cf. A000040, A045572. Analogous to A181709.

Programs

  • Mathematica
    Array[If[FreeQ[{2, 5}, #], 4 #1 + (#2 + 1)/2 - Boole[#2 > 5] & @@ QuotientRemainder[#, 10], 0] &@ Prime@ # &, 65]

Formula

For prime p_n for n =/= 1 nor n =/= 3, a(p_n) = 4*q + (r + 1)/2 - [r > 5] (Iverson brackets), where q = floor(p_n/10) and r = p_n mod 10.

A343447 Smallest m such that alternating integer 101...101 = A094028(m) is a multiple of A045572(n), (i.e., integers coprime with 10).

Original entry on oeis.org

0, 2, 2, 8, 10, 2, 7, 8, 2, 10, 26, 13, 14, 32, 2, 2, 4, 20, 22, 20, 23, 12, 8, 28, 29, 8, 32, 32, 34, 3, 32, 12, 80, 40, 41, 21, 2, 14, 47, 98, 1, 16, 52, 53, 2, 55, 8, 23, 120, 14, 20, 20, 64, 8, 3, 22, 68, 32, 20, 73, 74, 71, 38, 38, 32, 80, 82, 38, 8, 42
Offset: 1

Author

Bernard Schott, Apr 15 2021

Keywords

Comments

Every number coprime with 10 has a smallest multiple that is repunit (A099679).
Every positive number has a smallest multiple consisting of a succession of 1's followed by a succession of 0's (A052983).
Every number coprime with 10 has a smallest multiple that is alternating of the form 1010...0101 (this sequence).

Examples

			A045572(3) = 7, the smallest alternating multiple of 7 in A094028 is A094028(2) = 10101 because 1443*7 = 10101, as 1 and 101 are not divisible by 7, so a(3) = 2.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = (5*n + (Mod[3*n + 2, 4] - 4))/2, m = 0}, While[! Divisible[1 + 100*(100^m - 1)/99, k], m++]; m]; Array[a, 100] (* Amiram Eldar, Apr 15 2021 *)
  • PARI
    a045572(n)=10*(n>>2)+[-1,1,3,7][n%4+1] \\ after Charles R Greathouse IV in A045572
    a094028(n) = 1+100*(100^n-1)/99
    a(n) = for(m=0, oo, if(a094028(m)%a045572(n)==0, return(m))) \\ Felix Fröhlich, Apr 15 2021

Extensions

More terms from Felix Fröhlich, Apr 15 2021

A002163 Decimal expansion of square root of 5.

Original entry on oeis.org

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

Keywords

Comments

Also the limiting ratio of Lucas(n)/Fibonacci(n). - Alexander Adamchuk, Oct 10 2007
Continued fraction expansion is 2 followed by {4} repeated. - Harry J. Smith, Jun 01 2009
This is the first Lagrange number. - Alonso del Arte, Dec 06 2011
Equals Tachiya's Product_{n > 0} (1 + 2/A000032(2^n)) = 4*Product_{n > 0} (1 - 1/A000032(2^n)). - Jonathan Sondow, Jan 11 2012
A computation similar, with that of the universal parabolic constant, performed on the curve cosh(x) with the parameters of the osculating parabola, gives as result 2*sinh(arccosh(3/2)), that is sqrt(5) instead of 2.2955871... for the parabola. - Jean-François Alcover, Jul 18 2013
Because sqrt(5) = -1 + 2*phi, with the golden section phi from A001622, this is an integer in the quadratic number field Q(sqrt(5)). - Wolfdieter Lang, Jan 08 2018
This constant appears in the theorem of Hurwitz on the best approximation of any irrational number with infinitely many rationals: |theta - h/k| < 1/(sqrt(5)*k^2). See Niven, also for the Hurwitz 1891 reference. - Wolfdieter Lang, May 27 2018
Diameter of a sphere whose surface area equals 5*Pi. More generally, the square root of x is also the diameter of a sphere whose surface area equals x*Pi. - Omar E. Pol, Nov 11 2018

Examples

			2.236067977499789696409173668731276235440618359611525724270897245410520...
		

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 187, 203.
  • W. E. Mansell, Tables of Natural and Common Logarithms. Royal Society Mathematical Tables, Vol. 8, Cambridge Univ. Press, 1964, p. XVIII.
  • Ivan Niven, Diophantine Approximations, Interscience Publishers, 1963, Theorem 1.5, pp. 6, 14.
  • Clifford A. Pickover, Wonders of Numbers, Oxford University Press, NY, 2001, p. 106.
  • 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).
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 45.

Crossrefs

Cf. A040002 (continued fraction).

Programs

  • Magma
    SetDefaultRealField(RealField(100)); Sqrt(5); // Vincenzo Librandi, Feb 13 2020
  • Mathematica
    RealDigits[N[Sqrt[5],200]] (* Vladimir Joseph Stephan Orlovsky, May 27 2010 *)
  • PARI
    default(realprecision, 20080); x=sqrt(5); for (n=1, 20000, d=floor(x); x=(x-d)*10; write("b002163.txt", n, " ", d));  \\ Harry J. Smith, Jun 01 2009
    

Formula

e^(i*Pi) + 2*phi = sqrt(5).
From Christian Katzmann, Mar 19 2018: (Start)
Equals Sum_{n>=0} 5*(2*n)!/(n!^2*3^(2*n+1)).
Equals Sum_{n>=0} 25*(2*n+1)!/(n!^2*3^(2*n+3)). (End)
Equals -1 + 2*phi, with phi = A001622. An integer number in the real quadratic number field Q(sqrt(5)). - Wolfdieter Lang, May 09 2018
Equals Sum_{k>=0} binomial(2*k,k)/5^k. - Amiram Eldar, Aug 03 2020
Equals 2*sin(Pi/5) * 2*sin(2*Pi/5). - Gary W. Adamson, Jul 14 2022
Equals w - w^2 - w^3 + w^4 where w = exp(2*Pi*i/5). - Alexander R. Povolotsky, Nov 23 2022
From Antonio Graciá Llorente, Apr 18 2024: (Start)
Equals Product_{k>=0} ((10*k + 2)(10*k + 4)(10*k + 6)(10*k + 8))/((10*k + 1)*(10*k + 3)*(10*k + 7)*(10*k + 9)).
Equals Product_{k>=1} A217562(k)/A045572(k).
Equals Product_{k>=0} (1/2)*(((4*k + 9)/(4*k + 1))^(1/2) + ((4*k + 1)/(4*k + 9))^(1/2)).
Equals Product_{k>=1} (phi^k + phi)/(phi^k + phi - 1), with phi = A001622.
Equals Product_{k>=0} (Fibonacci(2*k + 3) + (-1)^k)/(Fibonacci(2*k + 3) - (-1)^k). (End)

Extensions

Sequence corrected by Paul Zimmermann, Mar 15 1996
Additional comments from Jason Earls, Mar 26 2001
Showing 1-10 of 77 results. Next