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-3 of 3 results.

A172372 Least number k such that the n-th prime not dividing 10 (A004139(n)) divides the repunit (10^k-1)/9.

Original entry on oeis.org

3, 6, 2, 6, 16, 18, 22, 28, 15, 3, 5, 21, 46, 13, 58, 60, 33, 35, 8, 13, 41, 44, 96, 4, 34, 53, 108, 112, 42, 130, 8, 46, 148, 75, 78, 81, 166, 43, 178, 180, 95, 192, 98, 99, 30, 222, 113, 228, 232, 7, 30, 50, 256, 262, 268, 5, 69, 28, 141, 146, 153, 155, 312, 79, 110
Offset: 1

Views

Author

Michel Lagneau, Feb 01 2010

Keywords

Comments

If p is an odd prime different from 5, then p divides an infinite number of terms of the sequence of repunits {1, 11, 111, 1111, ... }. The proof is elementary: let p be such a prime. If p = 3, then 3 divides (10^3-1)/9 = 111. Otherwise, take k = (10^p - 1)/9; by the Fermat theorem, 10^(p-1) == 1 (mod p), so p divides (10^(p-1)-1); since p is relatively prime to 9, it divides k. Trivially, if p divides any k digit repunit, it divides the k*m digit repunit as well.
Essentially the same as A002371. - T. D. Noe, Apr 11 2012

Examples

			3 divides 111, but not 1 or 11, so a(1) = 3.
7 divides 111111 but not 1, 11, 111, 1111, or 11111, so a(2) = 6.
		

References

  • David Wells, The Factors of the Repunits 11 through R_40, The Penguin Dictionary of Curious and Interesting Numbers, p. 219 Penguin 1986.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, 1997.
  • David Wells, Curious and Interesting Numbers (Revised), Penguin Books, page 114.

Crossrefs

Cf. A002275 (repunits), A002371 (period of decimal expansion of 1/prime(n)), A004139 (odd primes excluding 5), A095250 (11111111... (n times) mod n).

Programs

  • PARI
    a(n) = {k=1; p = if(n>1, prime(n+2), 3); while((10^k-1)/9 % p, k++); k;} \\ Michel Marcus, May 25 2014

Extensions

Corrected and edited by Michel Lagneau, Apr 25 2010
Term 6 between terms 44 and 96 doesn't belong to the sequence. The same for term 43 between terms 43 and 178. Corrected and edited by Krzysztof Wojtas, May 25 2014

A007401 Add n-1 to n-th term of 'n appears n times' sequence (A002024).

Original entry on oeis.org

1, 3, 4, 6, 7, 8, 10, 11, 12, 13, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76
Offset: 1

Views

Author

Keywords

Comments

Complement of A000096 = increasing sequence of positive integers excluding n*(n+3)/2. - Jonathan Vos Post, Aug 13 2005
As a triangle: (1; 3,4; 6,7,8; 10,11,12,13; ...), Row sums = A127736: (1, 7, 21, 46, 85, 141, 217, ...). - Gary W. Adamson, Oct 25 2007
Odd primes are a subsequence except 5, cf. A004139. - Reinhard Zumkeller, Jul 18 2011
A023532(a(n)) = 1. - Reinhard Zumkeller, Dec 04 2012
T(n,k) = ((n+k)^2+n-k)/2 - 1, n,k > 0, read by antidiagonals. - Boris Putievskiy, Jan 14 2013
A023531(a(n)) = 0. - Reinhard Zumkeller, Feb 14 2015

Examples

			From _Boris Putievskiy_, Jan 14 2013: (Start)
The start of the sequence as table:
   1,  3,  6, 10, 15, 21, 28, ...
   4,  7, 11, 16, 22, 29, 37, ...
   8, 12, 17, 23, 30, 38, 47, ...
  13, 18, 24, 31, 39, 48, 58, ...
  19, 25, 32, 40, 49, 59, 70, ...
  26, 33, 41, 50, 60, 71, 83, ...
  34, 42, 51, 61, 72, 84, 97, ...
  ...
The start of the sequence as triangle array read by rows:
   1;
   3,  4;
   6,  7,  8;
  10, 11, 12, 13;
  15, 16, 17, 18, 19;
  21, 22, 23, 24, 25, 26;
  28, 29, 30, 31, 32, 33, 34;
  ...
Row number r contains r numbers r*(r+1)/2, r*(r+1)/2+1, ..., r*(r+1)/2+r-1. (End)
		

References

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

Crossrefs

Programs

  • Haskell
    a007401 n = a007401_list !! n
    a007701_list = [x | x <- [0..], a023531 x == 0]
    -- Reinhard Zumkeller, Feb 14 2015, Dec 04 2012
    
  • Mathematica
    f[n_] := n + Floor[ Sqrt[2n] - 1/2]; Array[f, 66]; (* Robert G. Wilson v, Feb 13 2011 *)
  • PARI
    a(n)=n+floor(sqrt(n+n)-1/2) \\ Charles R Greathouse IV, Feb 13 2011
    
  • PARI
    for(m=1,9, for(n=m*(m+1)/2,(m^2+3*m-2)/2, print1(n", "))) \\ Charles R Greathouse IV, Feb 13 2011
    
  • Python
    from math import isqrt
    def A007401(n): return n-1+(isqrt(n<<3)+1>>1) # Chai Wah Wu, Oct 18 2022

Formula

From Boris Putievskiy, Jan 14 2013: (Start)
a(n) = A014132(n) - 1.
a(n) = A003057(n)^2 - A114327(n) - 1.
a(n) = ((t+2)^2 + i - j)/2-1, where
i = n-t*(t+1)/2,
j = (t*t+3*t+4)/2-n,
t = floor((-1+sqrt(8*n-7))/2). (End)

A090417 Primes of the form floor(2*Pi*n/(e*log(n))).

Original entry on oeis.org

7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281
Offset: 1

Views

Author

Roger L. Bagula, Jan 31 2004

Keywords

Comments

An entropy power of white noise function with N=1/log(n).
Function is based on asymptotic form of distribution: PrimePi[n]--> n/log(n) Function misses the first three primes {2,3,5}, but is pretty good after that.
It is easy to see due to the slow growth of the function that the sequence is precisely the primes greater than 5. [Charles R Greathouse IV, Aug 21 2011]

References

  • C. E. Shannon, The Mathematical Theory of Communication, page 93

Crossrefs

Cf. A004139.

Programs

  • Mathematica
    digits=5*200 f[n_]=Floor[2*Pi*n/(E*Log[n])] a=Delete[Union[Table[If [PrimeQ[f[n]]==True, f[n], 0], {n, 2, digits}]], 1]
  • PARI
    a(n)=prime(n+3) \\ Charles R Greathouse IV, Aug 21 2011
Showing 1-3 of 3 results.