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 31-40 of 85 results. Next

A086801 a(n) = prime(n) - 3.

Original entry on oeis.org

-1, 0, 2, 4, 8, 10, 14, 16, 20, 26, 28, 34, 38, 40, 44, 50, 56, 58, 64, 68, 70, 76, 80, 86, 94, 98, 100, 104, 106, 110, 124, 128, 134, 136, 146, 148, 154, 160, 164, 170, 176, 178, 188, 190, 194, 196, 208, 220, 224, 226, 230, 236, 238, 248, 254, 260, 266, 268, 274, 278
Offset: 1

Views

Author

Giovanni Teofilatto, Aug 05 2003

Keywords

Comments

Numbers n such that n+3 is a prime.

Examples

			n=16 is here because 16+3=19 is a prime.
		

References

  • M. Cerasoli, F. Eugeni and M. Protasi, Elementi di Matematica Discreta, Bologna 1988
  • Emanuele Munarini and Norma Zagaglia Salvi, Matematica Discreta, UTET, CittaStudiEdizioni, Milano 1997

Crossrefs

Programs

Formula

a(n) = 2*A067076(n) = 2*(A006254(n+1)-2).

Extensions

Extended by Ray Chandler, Nov 29 2003

A243065 Permutation of natural numbers, the odd bisection of A241909 halved; equally, a composition of A064216 and A241909: a(n) = A241909(A064216(n)).

Original entry on oeis.org

1, 2, 4, 8, 3, 16, 32, 9, 64, 128, 27, 256, 6, 5, 512, 1024, 81, 18, 2048, 243, 4096, 8192, 25, 16384, 12, 729, 32768, 54, 2187, 65536, 131072, 125, 162, 262144, 6561, 524288, 1048576, 15, 36, 2097152, 7, 4194304, 486, 19683, 8388608, 108, 59049, 1458, 16777216, 625, 33554432, 67108864, 75
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2014

Keywords

Comments

Are there any other fixed points than 1, 2, 18 and 72?

Crossrefs

Programs

Formula

a(1) = 1, and for n>=2, a(n) = A241909(2n-1)/2. Equally, a(n) = ceiling(A241909(2n-1)/2) for all n.
As a composition of related permutations:
a(n) = A241909(A064216(n)).
a(n) = A241909(A243061(A241909(n))).
For all n, a(A006254(n)) = 2^n.

A243066 Permutation of natural numbers, the even bisection of A241909 incremented by one and halved; equally, a composition of A241909 and A048673: a(n) = A048673(A241909(n)).

Original entry on oeis.org

1, 2, 5, 3, 14, 13, 41, 4, 8, 63, 122, 25, 365, 313, 38, 6, 1094, 18, 3281, 172, 188, 1563, 9842, 61, 23, 7813, 11, 1201, 29525, 123, 88574, 7, 938, 39063, 113, 39, 265721, 195313, 4688, 666, 797162, 858, 2391485, 8404, 74, 976563, 7174454, 85, 68, 88, 23438, 58825, 21523361, 28
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2014

Keywords

Comments

For n > 1, 2n is found in A241909 from the position (2*a(n))-1. I.e., A241909((2*a(n))-1) = 2n for all n >= 2.
Or in other words, a(n) gives the position in the odd bisection of A241909 where 2n is located at.
Are there any other fixed points than 1, 2, 18 and 72?

Crossrefs

Formula

a(1) = 1, a(n) = (A241909(2*n)+1)/2.
As a composition of related permutations:
a(n) = A048673(A241909(n)).
a(n) = A241909(A243062(A241909(n))).
For all n>=1, a(2^n) = A006254(n).

A243505 Permutation of natural numbers, take the odd bisection of A122111 and divide the largest prime factor out: a(n) = A052126(A122111(2n-1)).

Original entry on oeis.org

1, 2, 4, 8, 3, 16, 32, 6, 64, 128, 12, 256, 9, 5, 512, 1024, 24, 18, 2048, 48, 4096, 8192, 10, 16384, 27, 96, 32768, 36, 192, 65536, 131072, 20, 72, 262144, 384, 524288, 1048576, 15, 54, 2097152, 7, 4194304, 144, 768, 8388608, 108, 1536, 288, 16777216, 40, 33554432, 67108864, 30
Offset: 1

Views

Author

Antti Karttunen, Jun 25 2014

Keywords

Crossrefs

Programs

Formula

a(n) = A052126(A122111((2*n)-1)).
a(n) = A122111((2*n)-1) / A105560((2*n)-1).
As a composition of related permutations:
a(n) = A122111(A064216(n)).
a(n) = A241916(A243065(n)).
Other identities:
For all n >= 2, a(n) = A070003(A244984(n)-1) / A105560((2*n)-1).
For all n >= 1, a(A006254(n)) = A000079(n) and a(A007051(n)) = A000040(n).
For all n >= 1, A105560(2n-1) divides a(n).

A104275 Numbers k such that 2k-1 is not prime.

Original entry on oeis.org

1, 5, 8, 11, 13, 14, 17, 18, 20, 23, 25, 26, 28, 29, 32, 33, 35, 38, 39, 41, 43, 44, 46, 47, 48, 50, 53, 56, 58, 59, 60, 61, 62, 63, 65, 67, 68, 71, 72, 73, 74, 77, 78, 80, 81, 83, 85, 86, 88, 89, 92, 93, 94, 95, 98, 101, 102, 103, 104, 105, 107, 108, 109, 110, 111, 113
Offset: 1

Views

Author

Alexandre Wajnberg, Apr 17 2005

Keywords

Comments

Same as A053726 except for the first term of this sequence.
Numbers k such that A064216(k) is not prime. - Antti Karttunen, Apr 17 2015
Union of 1 and terms of the form (u+1)*(v+1) + u*v with 1 <= u <= v. - Ralf Steiner, Nov 17 2021

Examples

			a(1) = 1 because 2*1-1=1, not prime.
a(2) = 5 because 2*5-1=9, not prime (2, 3 and 4 give 3, 5 and 7 which are primes).
From _Vincenzo Librandi_, Jan 15 2013: (Start)
As a triangular array (apart from term 1):
   5;
   8,  13;
  11,  18,  25;
  14,  23,  32,  41;
  17,  28,  39,  50,  61;
  20,  33,  46,  59,  72,  85;
  23,  38,  53,  68,  83,  98, 113;
  26,  43,  60,  77,  94, 111, 128, 145;
  29,  48,  67,  86, 105, 124, 143, 162, 181;
  32,  53,  74,  95, 116, 137, 158, 179, 200, 221; etc.
which is obtained by (2*h*k + k + h + 1) with h >= k >= 1. (End)
The above array, which contains the same terms as A053726 but in different order and with some duplicates, has its own entry A144650. - _Antti Karttunen_, Apr 17 2015
		

Crossrefs

Cf. A006254 (complement), A246371 (a subsequence).

Programs

  • Magma
    [n: n in [1..220]| not IsPrime(2*n-1)]; // Vincenzo Librandi, Jan 28 2011
    
  • Maple
    remove(t -> isprime(2*t-1), [$1..1000]); # Robert Israel, Apr 17 2015
  • Mathematica
    Select[Range[115], !PrimeQ[2#-1] &] (* Robert G. Wilson v, Apr 18 2005 *)
  • PARI
    select( {is_A104275(n)=!isprime(n*2-1)}, [1..115]) \\ M. F. Hasler, Aug 02 2022
    
  • Python
    from sympy import isprime
    def ok(n): return not isprime(2*n-1)
    print(list(filter(ok, range(1, 114)))) # Michael S. Branicky, May 08 2021
    
  • Python
    from sympy import primepi
    def A104275(n):
        if n <= 2: return ((n-1)<<2)+1
        m, k = n-1, (r:=primepi(n-1)) + n - 1 + (n-1>>1)
        while m != k:
            m, k = k, (r:=primepi(k)) + n - 1 + (k>>1)
        return r+n-1 # Chai Wah Wu, Aug 02 2024
    
  • SageMath
    [n for n in (1..250) if not is_prime(2*n-1)] # G. C. Greubel, Oct 17 2023
  • Scheme
    (define (A104275 n) (if (= 1 n) 1 (A053726 (- n 1)))) ;; More code in A053726. - Antti Karttunen, Apr 17 2015
    

Formula

a(n) = A047845(n-1) + 1.
For n > 1, a(n) = A053726(n-1) = n + A008508(n-1). - Antti Karttunen, Apr 17 2015
a(n) = (A014076(n)+1)/2. - Robert Israel, Apr 17 2015

Extensions

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

A111333 Number of odd numbers <= n-th prime.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 9, 10, 12, 15, 16, 19, 21, 22, 24, 27, 30, 31, 34, 36, 37, 40, 42, 45, 49, 51, 52, 54, 55, 57, 64, 66, 69, 70, 75, 76, 79, 82, 84, 87, 90, 91, 96, 97, 99, 100, 106, 112, 114, 115, 117, 120, 121, 126, 129, 132, 135, 136, 139, 141, 142, 147, 154, 156, 157
Offset: 1

Views

Author

Giovanni Teofilatto, Nov 05 2005

Keywords

Comments

This is A006254 (numbers n such that 2n-1 is prime) with a leading 1. - Lambert Klasen (lambert.klasen(AT)gmx.net), Nov 06 2005
Same as smallest k such that prime(n) divides C(2k,k). - Jonathan Sondow, Jan 20 2016
Positions of records in A046112. - Hugo Pfoertner, Jul 11 2019

Crossrefs

Programs

Formula

a(n) = ceiling((prime_n)/2). - Robert G. Wilson v, Nov 07 2005

Extensions

More terms from Robert G. Wilson v, Nov 07 2005

A243506 Permutation of natural numbers: a(n) = A048673(A122111(n)).

Original entry on oeis.org

1, 2, 5, 3, 14, 8, 41, 4, 13, 23, 122, 11, 365, 68, 38, 6, 1094, 18, 3281, 32, 113, 203, 9842, 17, 63, 608, 25, 95, 29525, 53, 88574, 7, 338, 1823, 188, 28, 265721, 5468, 1013, 50, 797162, 158, 2391485, 284, 74, 16403, 7174454, 20, 313, 88, 3038, 851, 21523361, 39, 563, 149, 9113, 49208, 64570082, 83, 193710245, 147623, 221, 9
Offset: 1

Views

Author

Antti Karttunen, Jun 25 2014

Keywords

Crossrefs

Inverse: A243505.
Related or similar permutations: A048673, A122111, A243065-A243066, A244981-A244982, A244983-A244984, A244153-A244154.

Programs

Formula

a(n) = A048673(A122111(n)).
a(n) = A243066(A241916(n)).
For all n >= 1, a(A000040(n)) = A007051(n) and a(A000079(n)) = A006254(n).

A028815 a(n) = prime(n) + 1 (starting with 1).

Original entry on oeis.org

2, 3, 4, 6, 8, 12, 14, 18, 20, 24, 30, 32, 38, 42, 44, 48, 54, 60, 62, 68, 72, 74, 80, 84, 90, 98, 102, 104, 108, 110, 114, 128, 132, 138, 140, 150, 152, 158, 164, 168, 174, 180, 182, 192, 194, 198, 200, 212, 224, 228, 230, 234, 240, 242, 252, 258, 264, 270, 272, 278, 282, 284
Offset: 0

Views

Author

Keywords

Comments

n-th noncomposite (unit or prime) positive integer + 1.
The "0th prime" is defined to be 1 (a unit, formerly considered to be prime).

Crossrefs

Programs

Formula

a(n) = prime(n) + 1 = A000040(n) + 1 = A008864(n) for n >= 1.
a(n) = A008578(n+1) + 1, n >= 0.
a(n) = 2*A006254(n-1), for n >= 2, with a(0) = 2, a(1) = 3. - G. C. Greubel, Aug 05 2024

A246372 Numbers n such that 2n-1 = product_{k >= 1} (p_k)^(c_k), then n <= product_{k >= 1} (p_{k-1})^(c_k), where p_k indicates the k-th prime, A000040(k).

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 9, 10, 12, 15, 16, 19, 20, 21, 22, 24, 25, 26, 27, 29, 30, 31, 33, 34, 35, 36, 37, 40, 42, 44, 45, 46, 47, 48, 49, 51, 52, 54, 55, 56, 57, 60, 62, 64, 65, 66, 67, 69, 70, 71, 72, 75, 76, 78, 79, 80, 81, 82, 84, 85, 87, 89, 90, 91, 92, 93, 96, 97, 99, 100, 101, 102, 103, 105, 106, 107, 108, 109, 110
Offset: 1

Views

Author

Antti Karttunen, Aug 24 2014

Keywords

Comments

Numbers n such that A064216(n) >= n.
Numbers n such that A064989(2n-1) >= n.

Examples

			1 is present, as 2*1 - 1 = empty product = 1.
2 is present, as 2*2 - 1 = 3 = p_2, and p_{2-1} = p_1 = 2 >= 2.
3 is present, as 2*3 - 1 = 5 = p_3, and p_{3-1} = p_2 = 3 >= 3.
5 is not present, as 2*5 - 1 = 9 = p_2 * p_2, and p_1 * p_1 = 4, with 4 < 5.
6 is present, as 2*6 - 1 = 11 = p_5, and p_{5-1} = p_4 = 7 >= 6.
25 is present, as 2*25 - 1 = 49 = p_4^2, and p_3^2 = 5*5 = 25 >= 25.
35 is present, as 2*35 - 1 = 69 = 3*23 = p_2 * p_9, and p_1 * p_8 = 2*19 = 38 >= 35.
		

Crossrefs

Complement: A246371
Union of A246362 and A048674.
Subsequences: A006254 (A111333), A246373 (the primes present in this sequence).

Programs

  • PARI
    default(primelimit, 2^30);
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A064216(n) = A064989((2*n)-1);
    isA246372(n) = (A064216(n) >= n);
    n = 0; i = 0; while(i < 10000, n++; if(isA246372(n), i++; write("b246372.txt", i, " ", n)));
    (Scheme, with Antti Karttunen's IntSeq-library)
    (define A246372 (MATCHING-POS 1 1 (lambda (n) (>= (A064216 n) n))))

A053726 "Flag numbers": number of dots that can be arranged in successive rows of K, K-1, K, K-1, K, ..., K-1, K (assuming there is a total of L > 1 rows of size K > 1).

Original entry on oeis.org

5, 8, 11, 13, 14, 17, 18, 20, 23, 25, 26, 28, 29, 32, 33, 35, 38, 39, 41, 43, 44, 46, 47, 48, 50, 53, 56, 58, 59, 60, 61, 62, 63, 65, 67, 68, 71, 72, 73, 74, 77, 78, 80, 81, 83, 85, 86, 88, 89, 92, 93, 94, 95, 98, 101, 102, 103, 104, 105, 107, 108, 109, 110, 111, 113, 116
Offset: 1

Views

Author

Dan Asimov, asimovd(AT)aol.com, Apr 09 2003

Keywords

Comments

Numbers of the form F(K, L) = KL+(K-1)(L-1), K, L > 1, i.e. 2KL - (K+L) + 1, sorted and duplicates removed.
If K=1, L=1 were allowed, this would contain all positive integers.
Positive numbers > 1 but not of the form (odd primes plus one)/2. - Douglas Winston (douglas.winston(AT)srupc.com), Sep 11 2003
In other words, numbers n such that 2n-1, or equally, A064216(n) is a composite number. - Antti Karttunen, Apr 17 2015
Note: the following comment was originally applied in error to the numerically similar A246371. - Allan C. Wechsler, Aug 01 2022
From Matthijs Coster, Dec 22 2014: (Start)
Also area of (over 45 degree) rotated rectangles with sides > 1. The area of such rectangles is 2ab - a - b + 1 = 1/2((2a-1)(2b-1)+1).
Example: Here a = 3 and b = 5. The area = 23.
*
***
*****
*****
*****
***
*
(End)
The smallest integer > k/2 and coprime to k, where k is the n-th odd composite number. - Mike Jones, Jul 22 2024
Numbers k such that A193773(k-1) > 1. - Allan C. Wechsler, Oct 22 2024

Crossrefs

Essentially same as A104275, but without the initial one.
A144650 sorted into ascending order, with duplicates removes.
Cf. A006254 (complement, apart from 1, which is in neither sequence).
Differs from its subsequence A246371 for the first time at a(8) = 20, which is missing from A246371.

Programs

  • PARI
    select( {is_A053726(n)=n>4 && !isprime(n*2-1)}, [1..115]) \\ M. F. Hasler, Aug 02 2022
  • Python
    from sympy import isprime
    def ok(n): return n > 1 and not isprime(2*n-1)
    print(list(filter(ok, range(1, 117)))) # Michael S. Branicky, May 08 2021
    
  • Python
    from sympy import primepi
    def A053726(n):
        if n == 1: return 5
        m, k = n, (r:=primepi(n)) + n + (n>>1)
        while m != k:
            m, k = k, (r:=primepi(k)) + n + (k>>1)
        return r+n # Chai Wah Wu, Aug 02 2024
    
  • Scheme
    ;; with Antti Karttunen's IntSeq-library.
    (define A053726 (MATCHING-POS 1 1 (lambda (n) (and (> n 1) (not (prime? (+ n n -1)))))))
    ;; Antti Karttunen, Apr 17 2015
    
  • Scheme
    ;; with Antti Karttunen's IntSeq-library.
    (define (A053726 n) (+ n (A000720 (A071904 n))))
    ;; Antti Karttunen, Apr 17 2015
    

Formula

a(n) = A008508(n) + n + 1.
From Antti Karttunen, Apr 17 2015: (Start)
a(n) = n + A000720(A071904(n)). [The above formula reduces to this. A000720(k) gives number of primes <= k, and A071904 gives the n-th odd composite number.]
a(n) = A104275(n+1). (End)
a(n) = A116922(A071904(n)). - Mike Jones, Jul 22 2024
a(n) = A047845(n+1)+1. - Amiram Eldar, Jul 30 2024

Extensions

More terms from Douglas Winston (douglas.winston(AT)srupc.com), Sep 11 2003
Previous Showing 31-40 of 85 results. Next