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 21-30 of 102 results. Next

A246377 Permutation of natural numbers: a(1) = 1, a(p_n) = 2*a(n)+1, a(c_n) = 2*a(n), where p_n = n-th prime = A000040(n), c_n = n-th composite number = A002808(n).

Original entry on oeis.org

1, 3, 7, 2, 15, 6, 5, 14, 4, 30, 31, 12, 13, 10, 28, 8, 11, 60, 29, 62, 24, 26, 9, 20, 56, 16, 22, 120, 61, 58, 63, 124, 48, 52, 18, 40, 25, 112, 32, 44, 27, 240, 21, 122, 116, 126, 57, 248, 96, 104, 36, 80, 17, 50, 224, 64, 88, 54, 23, 480, 121, 42, 244, 232, 252, 114, 59, 496, 192, 208, 125, 72, 49, 160, 34, 100
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2014

Keywords

Comments

This permutation is otherwise like Katarzyna Matylla's A135141, except that the role of even and odd numbers (or alternatively: primes and composites) has been swapped.
Because 2 is the only even prime, it implies that, apart from a(2)=3, odd numbers occur in odd positions only (along with many even numbers that also occur in odd positions).
This also implies that for each odd composite (A071904) there exists a separate infinite cycle in this permutation, apart from 9 and 15 which are in the same infinite cycle: (..., 23, 9, 4, 2, 3, 7, 5, 15, 28, 120, 82, 46, ...).

Crossrefs

Inverse: A246378.
Other related or similar permutations: A135141, A054429, A246201, A245703, A246376, A246379, A243071, A246681, A236854.
Differs from A237427 for the first time at n=19, where a(19) = 29, while A237427(19) = 62.

Formula

a(1) = 1, and for n > 1, if A010051(n) = 1 [i.e. when n is a prime], a(n) = 1+(2*a(A000720(n))), otherwise a(n) = 2*a(A065855(n)).
As a composition of related permutations:
a(n) = A054429(A135141(n)).
a(n) = A135141(A236854(n)).
a(n) = A246376(A246379(n)).
a(n) = A246201(A245703(n)).
a(n) = A243071(A246681(n)). [For n >= 1].
Other identities.
For all n > 1 the following holds:
A000035(a(n)) = A010051(n). [Maps primes to odd numbers > 1, and composites to even numbers, in some order. Permutations A246379 & A246681 have the same property].

A246378 Permutation of natural numbers: a(1) = 1, a(2n) = nthcomposite(a(n)), a(2n+1) = nthprime(a(n)), where nthcomposite = A002808, nthprime = A000040.

Original entry on oeis.org

1, 4, 2, 9, 7, 6, 3, 16, 23, 14, 17, 12, 13, 8, 5, 26, 53, 35, 83, 24, 43, 27, 59, 21, 37, 22, 41, 15, 19, 10, 11, 39, 101, 75, 241, 51, 149, 114, 431, 36, 89, 62, 191, 40, 103, 82, 277, 33, 73, 54, 157, 34, 79, 58, 179, 25, 47, 30, 67, 18, 29, 20, 31, 56, 167, 134, 547, 102, 379, 304, 1523, 72, 233
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2014

Keywords

Comments

Contains an infinite number of infinite cycles. See comments at A246377.

Crossrefs

Inverse: A246377.
Similar or related permutations: A237126, A054429, A227413, A236854, A246375, A246380, A246682, A163511.

Programs

Formula

a(1) = 1, a(2n) = nthcomposite(a(n)), a(2n+1) = nthprime(a(n)), where nthcomposite = A002808, nthprime = A000040.
As a composition of related permutations:
a(n) = A227413(A054429(n)).
a(n) = A236854(A227413(n)).
a(n) = A246380(A246375(n)).
a(n) = A246682(A163511(n)). [For n >= 1].
Other identities. For all n > 1 the following holds:
A010051(a(n)) = A000035(n). [Maps odd numbers larger than one to primes, and even numbers to composites, in some order. Permutations A246380 & A246682 have the same property].

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

A254671 Numbers that can be represented as x*y + x + y, where x >= y > 1.

Original entry on oeis.org

8, 11, 14, 15, 17, 19, 20, 23, 24, 26, 27, 29, 31, 32, 34, 35, 38, 39, 41, 43, 44, 47, 48, 49, 50, 51, 53, 54, 55, 56, 59, 62, 63, 64, 65, 67, 68, 69, 71, 74, 75, 76, 77, 79, 80, 83, 84, 86, 87, 89, 90, 91, 92, 94, 95, 97, 98, 99, 101, 103, 104, 107, 109, 110, 111, 113
Offset: 1

Views

Author

Alex Ratushnyak, Feb 04 2015

Keywords

Comments

Apparently 8 and the elements of A061743. - R. J. Mathar, Feb 19 2015
This is true. For proof, see link.
As x*y + x + y = (x + 1)*(y + 1) - 1 where x >= y > 1 we have k = a(n) is in the sequence if and only if k + 1 is an odd composite or k + 1 is an even number with more than 4 divisors. - David A. Corneth, Oct 15 2024

Examples

			14 = 2*4 + 2 + 4.
15 = 3*3 + 3 + 3.
There is no way to express 16 in this form, so it is not in the sequence.
		

Crossrefs

Cf. A071904, A254636 is the complement.

Programs

  • Maple
    filter:= proc(n) local t;
      if n::odd then numtheory:-tau(n+1) > 4 else not isprime(n+1) fi
    end proc:
    select(filter, [$1..200]); # Robert Israel, Nov 14 2024
  • Mathematica
    sol[t_] := Solve[x >= y > 1 && x y + x + y == t, {x, y}, Integers];
    Select[Range[200], sol[#] != {}&] (* Jean-François Alcover, Jul 28 2020 *)
  • Python
    def aupto(limit):
        cands = range(2, limit//3+1)
        nums = [x*y+x+y for i, y in enumerate(cands) for x in cands[i:]]
        return sorted(set(k for k in nums if k <= limit))
    print(aupto(113)) # Michael S. Branicky, Aug 11 2021
    
  • Python
    from sympy import primepi
    def A254671(n):
        def f(x): return int(n+(x>=7)+primepi(x+1)+primepi(x+1>>1))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Oct 14 2024

A083658 a(n) = a(n-1) + a(n-2) + gcd(a(n-1), a(n-2)) for n > 1; a(0)=1, a(1)=1.

Original entry on oeis.org

1, 1, 3, 5, 9, 15, 27, 45, 81, 135, 243, 405, 729, 1215, 2187, 3645, 6561, 10935, 19683, 32805, 59049, 98415, 177147, 295245, 531441, 885735, 1594323, 2657205, 4782969, 7971615, 14348907, 23914845, 43046721, 71744535, 129140163, 215233605, 387420489
Offset: 0

Views

Author

Paul D. Hanna, Jun 13 2003

Keywords

Comments

Record high values in A003961 (except for the duplicated 1). - Nicolas Bělohoubek, Jun 18 2022
Apart from a(0), this sequence is the answer to Question 21 in the 2022 Shanghai College Entrance Mathematics Examination: a(1) = 1, a(2*m) = 3^m for all m; for any n >= 2, there exists 1 <= i <= n-1 such that a(n+1) = 2*a(n)-a(i). Find a(n). - Yifan Xie, Jul 20 2022
a(n) n>1 are a subset of the record values formed by the odd composite numbers (A071904) divided by their largest prime factor. For example, A071904[2434] = 6561 with largest pf = 3. 6561/3 = 2187 and appears in A083658. - Bill McEachen, Jul 06 2024

Crossrefs

Cf. A003961.

Programs

Formula

a(2n) = 3^n, a(2n+1) = 5*3^(n-1) for n>0; a(0)=1, a(1)=1.
G.f.: (2*x^3+1+x)/(1-3*x^2). - R. J. Mathar, Feb 27 2010
a(n) = 3 * a(n-2), n>3, a(2)=3, a(3)=5. - Bill McEachen, Jul 06 2024

A246681 Permutation of natural numbers: a(0) = 1, a(1) = 2, a(p_n) = A003961(a(n)), a(c_n) = 2*a(n), where p_n = n-th prime = A000040(n), c_n = n-th composite number = A002808(n), and A003961(n) shifts the prime factorization of n one step towards larger primes.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 6, 9, 10, 8, 14, 11, 12, 15, 18, 20, 16, 25, 28, 21, 22, 24, 30, 27, 36, 40, 32, 50, 56, 33, 42, 13, 44, 48, 60, 54, 72, 45, 80, 64, 100, 35, 112, 75, 66, 84, 26, 63, 88, 96, 120, 108, 144, 81, 90, 160, 128, 200, 70, 49, 224, 99, 150, 132, 168, 52, 126, 55, 176, 192, 240, 39
Offset: 0

Views

Author

Antti Karttunen, Sep 01 2014

Keywords

Comments

Note the indexing: the domain starts from 0, while the range excludes zero.
Iterating a(n) from n=0 gives the sequence: 1, 2, 3, 5, 7, 9, 8, 10, 14, 18, 28, 56, 128, 156, 1344, 16524, 2706412500, ..., which is the only one-way cycle of this permutation.
Because 2 is the only even prime, it implies that, apart from a(0)=1 and a(2)=3, odd numbers occur in odd positions only (along with many even numbers that also occur in odd positions). This in turn implies that there exists an infinite number of infinite cycles like (... 648391 31 13 15 20 22 30 42 112 196 1350 ...) which contain just one odd composite (A071904). Apart from 9 which is in that one-way cycle, each odd composite occurs in a separate infinite two-way cycle, like 15 in the example above.

Crossrefs

Inverse: A246682.
Similar or related permutations: A163511, A246377, A246379, A246367, A245821.

Formula

a(0) = 1, a(1) = 2, and for n > 1, if A010051(n) = 1 [i.e. when n is a prime], a(n) = A003961(a(A000720(n))), otherwise a(n) = 2*a(A065855(n)).
Other identities.
For all n >= 0, the following holds:
a(A007097(n)) = A000040(n+1). [Maps the iterates of primes to primes].
A078442(a(n)) > 0 if and only if n is in A007097. [Follows from above].
For all n >= 1, the following holds:
a(n) = A163511(A246377(n)).
A000035(a(n)) = A010051(n). [Maps primes to odd numbers > 1, and composites to even numbers, in some order. Permutations A246377 & A246379 have the same property].
A055396(a(n)) = A049076(n). [An "order of primeness" is mapped to the index of the smallest prime dividing n].

A340095 Odd composite integers m such that A052918(m-J(m,29)) == 0 (mod m) and gcd(m,29)=1, where J(m,29) is the Jacobi symbol.

Original entry on oeis.org

9, 15, 27, 45, 91, 121, 135, 143, 1547, 1573, 1935, 2015, 6543, 6721, 8099, 10403, 10877, 10905, 13319, 13741, 13747, 14399, 14705, 16109, 16471, 18901, 19043, 19109, 19601, 19951, 20591, 22753, 24639, 26599, 26937, 27593
Offset: 1

Views

Author

Ovidiu Bagdasar, Dec 28 2020

Keywords

Comments

The generalized Lucas sequences of integer parameters (a,b) defined by U(m+2)=a*U(m+1)-b*U(m) and U(0)=0, U(1)=1, satisfy the identity
U(p-J(p,D)) == 0 (mod p) when p is prime, b=-1 and D=a^2+4.
This sequence contains the odd composite integers with U(m-J(m,D)) == 0 (mod m).
For a=5 and b=-1, we have D=29 and U(m) recovers A052918(m).
If even numbers greater than 2 that are coprime to 29 are allowed, then 26, 442, 6994, ... would also be terms. - Jianing Song, Jan 09 2021

References

  • D. Andrica and O. Bagdasar, Recurrent Sequences: Key Results, Applications and Problems. Springer, 2020.

Crossrefs

Cf. A052918, A071904, A081264 (a=1, b=-1), A327653 (a=3, b=-1), A340096 (a=7, b=-1), A340097 (a=3, b=1), A340098 (a=5, b=1), A340099 (a=7, b=1).

Programs

  • Mathematica
    Select[Range[3,28000, 2], CoprimeQ[#, 29] && CompositeQ[#] && Divisible[Fibonacci[#-JacobiSymbol[#, 29], 5], #] &]

Extensions

Coprime condition added to definition by Georg Fischer, Jul 20 2022

A340096 Odd composite integers m such that A054413(m-J(m,53)) == 0 (mod m), where J(m,53) is the Jacobi symbol.

Original entry on oeis.org

25, 35, 51, 65, 91, 175, 325, 391, 455, 575, 1247, 1295, 1633, 1763, 1775, 1921, 2275, 2407, 2599, 2651, 3367, 4199, 4579, 4623, 5629, 6441, 9959, 10465, 10825, 10877, 12025, 13021, 15155, 16021, 18881, 19019, 19039, 19307, 19669
Offset: 1

Views

Author

Ovidiu Bagdasar, Dec 28 2020

Keywords

Comments

The generalized Lucas sequences of integer parameters (a,b) defined by U(m+2)=a*U(m+1)-b*U(m) and U(0)=0, U(1)=1, satisfy the identity
U(p-J(p,D)) == 0 (mod p) when p is prime, b=-1 and D=a^2+4.
This sequence contains the odd composite integers with U(m-J(m,D)) == 0 (mod m).
For a=7 and b=-1, we have D=53 and U(m) recovers A054413(m).
If even numbers greater than 2 that are coprime to 53 are allowed, then 10, 50, 370, 5050, ... would also be terms. - Jianing Song, Jan 09 2021

References

  • D. Andrica, O. Bagdasar, Recurrent Sequences: Key Results, Applications and Problems. Springer, 2020.
  • D. Andrica, O. Bagdasar, On some new arithmetic properties of the generalized Lucas sequences, Mediterr. J. Math. (to appear, 2021).
  • D. Andrica, O. Bagdasar, On generalized pseudoprimality of level k (submitted).

Crossrefs

Cf. A054413, A071904, A081264 (a=1, b=-1), A327653 (a=3,b=-1), A340095 (a=5, b=-1)
Cf. A340097 (a=3, b=1), A340098 (a=5, b=1), A340099 (a=7, b=1).

Programs

  • Mathematica
    Select[Range[3,20000, 2], CoprimeQ[#, 53] && CompositeQ[#] && Divisible[Fibonacci[#-JacobiSymbol[#, 53], 7], #] &]

A340097 Odd composite integers m such that A001906(m-J(m,5)) == 0 (mod m) and gcd(m,5)=1, where J(m,5) is the Jacobi symbol.

Original entry on oeis.org

21, 323, 329, 377, 451, 861, 1081, 1819, 1891, 2033, 2211, 3653, 3827, 4089, 4181, 5671, 5777, 6601, 6721, 8149, 8557, 10877, 11309, 11663, 13201, 13861, 13981, 14701, 15251, 17119, 17513, 17711, 17941, 18407, 19043, 19951, 20473, 23407, 25369, 25651, 25877, 27323, 27511
Offset: 1

Views

Author

Ovidiu Bagdasar, Dec 28 2020

Keywords

Comments

The generalized Lucas sequences of integer parameters (a,b) defined by U(m+2)=a*U(m+1)-b*U(m) and U(0)=0, U(1)=1, satisfy the identity
U(p-J(p,D)) == 0 (mod p) when p is prime, b=1 and D=a^2-4.
This sequence contains the odd composite integers with U(m-J(m,D)) == 0 (mod m).
For a=3 and b=1, we have D=5 and U(m) recovers A001906(m).

References

  • D. Andrica and O. Bagdasar, Recurrent Sequences: Key Results, Applications and Problems. Springer, 2020.

Crossrefs

Cf. A001906, A071904, A081264 (a=1, b=-1), A327653 (a=3,b=-1), A340095 (a=5, b=-1), A340096 (a=7, b=-1), A340098 (a=5, b=1), A340099 (a=7, b=1).

Programs

  • Mathematica
    Select[Range[3, 30000, 2], CoprimeQ[#, 5] && CompositeQ[#] && Divisible[ChebyshevU[# - JacobiSymbol[#, 5] - 1, 3/2], #] &]

Extensions

Coprime condition added to definition by Georg Fischer, Jul 20 2022

A340098 Odd composite integers m such that A004254(m-J(m,21)) == 0 (mod m) and gcd(m,21)=1, where J(m,21) is the Jacobi symbol.

Original entry on oeis.org

115, 253, 391, 527, 551, 713, 715, 779, 935, 1705, 1807, 1919, 2627, 2893, 2929, 3281, 4033, 4141, 5191, 5671, 5777, 5983, 6049, 6479, 7645, 7739, 8695, 9361, 11663, 11815, 12121, 12209, 12265, 14491, 17249, 17963, 18299, 18407, 20087, 20099, 21505, 22499, 24463
Offset: 1

Views

Author

Ovidiu Bagdasar, Dec 28 2020

Keywords

Comments

The generalized Lucas sequences of integer parameters (a,b) defined by U(m+2)=a*U(m+1)-b*U(m) and U(0)=0, U(1)=1, satisfy the identity
U(p-J(p,D)) == 0 (mod p) when p is prime, b=1 and D=a^2-4.
This sequence contains the odd composite integers with U(m-J(m,D)) == 0 (mod m).
For a=5 and b=1, we have D=21 and U(m) recovers A004254(m).

References

  • D. Andrica, O. Bagdasar, Recurrent Sequences: Key Results, Applications and Problems. Springer, 2020.
  • D. Andrica, O. Bagdasar, On some new arithmetic properties of the generalized Lucas sequences, Mediterr. J. Math. (to appear, 2021).
  • D. Andrica, O. Bagdasar, On generalized pseudoprimality of level k (submitted).

Crossrefs

Cf. A004254, A071904, A081264 (a=1, b=-1), A327653 (a=3,b=-1), A340095 (a=5, b=-1), A340096 (a=7, b=-1), A340097 (a=3, b=1), A340099 (a=7, b=1).

Programs

  • Mathematica
    Select[Range[3, 25000, 2], CoprimeQ[#, 21] && CompositeQ[#] && Divisible[ChebyshevU[# - JacobiSymbol[#, 21] - 1, 5/2], #] &]
Previous Showing 21-30 of 102 results. Next