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 23 results. Next

A135506 a(n) = x(n+1)/x(n) - 1 where x(1)=1 and x(k) = x(k-1) + lcm(x(k-1),k). Here x(n) = A135504(n).

Original entry on oeis.org

2, 1, 2, 5, 1, 7, 1, 1, 5, 11, 1, 13, 1, 5, 1, 17, 1, 19, 1, 1, 11, 23, 1, 5, 13, 1, 1, 29, 1, 31, 1, 11, 17, 1, 1, 37, 1, 13, 1, 41, 1, 43, 1, 1, 23, 47, 1, 1, 1, 17, 13, 53, 1, 1, 1, 1, 29, 59, 1, 61, 1, 1, 1, 13, 1, 67, 1, 23, 1, 71, 1, 73, 1, 1, 1, 1, 13, 79, 1, 1, 41, 83, 1, 1, 43, 29, 1, 89
Offset: 1

Views

Author

Benoit Cloitre, Feb 09 2008

Keywords

Comments

This sequence has properties related to primes. For instance: terms consist of 1's or primes only; if 3 never occurs, any prime p occurs finitely many times.
All prime numbers 'p' from the sequence A014963(n), which equals A003418(n+1)/A003418(n), are in a(n-1) = p. - Eric Desbiaux, Jan 11 2015
For any prime p > 3, a(p-1) = p. Also a(n) is not 3 for any n. All terms but a(1) and a(3) are odd, and probably all of them are not composite numbers; this is strongly related to a strong version of Linnik's Theorem (see Ruiz-Cabello link). - Serafín Ruiz-Cabello, Sep 30 2015
Per the prior comment, the distinct prime terms correspond to A045344. This is every prime except for 3. - Bill McEachen, Sep 12 2022

Crossrefs

Cf. A045344, A135504, A361460, A361461 (positions of 1's), A361462 [= a(n) mod 4], A361463, A361464, A361470.
Cf. also A106108.

Programs

  • Maple
    x[1]:= 1;
    for n from 2 to 101 do
      x[n]:= x[n-1] + ilcm(x[n-1],n);
      a[n-1]:= x[n]/x[n-1]-1;
    od:
    seq(a[n],n=1..100); # Robert Israel, Jan 11 2015
  • Mathematica
    a[n_] := x[n+1]/x[n] - 1; x[1] = 1; x[k_] := x[k] = x[k-1] + LCM[x[k-1], k]; Table[a[n], {n, 1, 88}] (* Jean-François Alcover, Jan 08 2013 *)
  • PARI
    x1=1;for(n=2,40,x2=x1+lcm(x1,n);t=x1;x1=x2;print1(x2/t-1,","))
    
  • Python
    from itertools import count, islice
    from math import lcm
    def A135506_gen(): # generator of terms
        x = 1
        for n in count(2):
            y = x+lcm(x,n)
            yield y//x-1
            x = y
    A135506_list = list(islice(A135506_gen(),20)) # Chai Wah Wu, Mar 13 2023

Formula

a(n) = A135504(n+1)/A135504(n) - 1.
a(n) = (n+1) / A361470(n). - Antti Karttunen, Mar 26 2023

Extensions

References to A135504 added by Antti Karttunen, Mar 07 2023

A346242 Dirichlet inverse of A324198, where A324198(n) = gcd(n, A276086(n)).

Original entry on oeis.org

1, -1, -3, 0, -1, 5, -1, 0, 6, -3, -1, -2, -1, 1, -9, 0, -1, -16, -1, 4, 3, 1, -1, 0, -24, 1, -12, 0, -1, 43, -1, 0, 3, 1, -5, 14, -1, 1, 3, 0, -1, -11, -1, 0, 54, 1, -1, 0, -6, 32, 3, 0, -1, 44, -3, -6, 3, 1, -1, -50, -1, 1, -24, 0, 1, -5, -1, 0, 3, -15, -1, -4, -1, 1, 96, 0, -5, -5, -1, 0, 24, 1, -1, 8, -3, 1, 3, 0, -1
Offset: 1

Views

Author

Antti Karttunen, Jul 13 2021

Keywords

Crossrefs

Cf. A008966 (parity of terms), A005117 (positions of odd terms), A013929 (of even terms), A045344 (of -1's, at least a subset of them), A354810 (of 0's), A354811 (of 1's), A354812 (of 2's), A354813 (of 3's), A354814 (of 4's), A354822 (of -2's).

Programs

  • PARI
    up_to = 65537;
    DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(dA324198(n) = { my(m=1, p=2, orgn=n); while(n, m *= (p^min(n%p, valuation(orgn, p))); n = n\p; p = nextprime(1+p)); (m); };
    v346242 = DirInverseCorrect(vector(up_to,n,A324198(n)));
    A346242(n) = v346242[n];

Formula

a(n) = A346243(n) - A324198(n).
From Antti Karttunen, Jun 09 2022: (Start)
a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, dA324198(n/d) * a(d).
For all n >= 1, A000035(a(n)) = A008966(n).
For all n >= 1, a(A045344(n)) = -1.
(End)

A375703 Minimum of the n-th maximal run of adjacent (increasing by one at a time) non-perfect-powers.

Original entry on oeis.org

2, 5, 10, 17, 26, 28, 33, 37, 50, 65, 82, 101, 122, 126, 129, 145, 170, 197, 217, 226, 244, 257, 290, 325, 344, 362, 401, 442, 485, 513, 530, 577, 626, 677, 730, 785, 842, 901, 962, 1001, 1025, 1090, 1157, 1226, 1297, 1332, 1370, 1445, 1522, 1601, 1682, 1729
Offset: 1

Views

Author

Gus Wiseman, Aug 28 2024

Keywords

Comments

Non-perfect-powers A007916 are numbers without a proper integer root.

Examples

			The list of all non-perfect-powers, split into runs, begins:
   2   3
   5   6   7
  10  11  12  13  14  15
  17  18  19  20  21  22  23  24
  26
  28  29  30  31
  33  34  35
  37  38  39  40  41  42  43  44  45  46  47  48
Row n has length A375702, first a(n), last A375704, sum A375705.
		

Crossrefs

For prime numbers we have A045344.
For nonsquarefree numbers we have A053806, anti-runs A373410.
For nonprime numbers we have A055670, anti-runs A005381.
For squarefree numbers we have A072284, anti-runs A373408.
The anti-run version is A216765 (same as A375703 with 2 exceptions).
For non-prime-powers we have A373673, anti-runs A120430.
For prime-powers we have A373676, anti-runs A373575.
For runs of non-perfect-powers (A007916):
- length: A375702 = A053289(n+1) - 1.
- first: A375703 (this)
- last: A375704
- sum: A375705
A001597 lists perfect-powers, differences A053289.
A007916 lists non-perfect-powers, differences A375706.
A046933 counts composite numbers between primes.
A375736 gives lengths of anti-runs of non-prime-powers, sums A375737.

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Min/@Split[Select[Range[100],radQ],#1+1==#2&]//Most
    - or -
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Select[Range[100],radQ[#]&&!radQ[#-1]&]

Formula

Numbers k > 0 such that k-1 is a perfect power (A001597) but k is not.

A375704 Maximum of the n-th maximal run of adjacent (increasing by one at a time) non-perfect-powers.

Original entry on oeis.org

3, 7, 15, 24, 26, 31, 35, 48, 63, 80, 99, 120, 124, 127, 143, 168, 195, 215, 224, 242, 255, 288, 323, 342, 360, 399, 440, 483, 511, 528, 575, 624, 675, 728, 783, 840, 899, 960, 999, 1023, 1088, 1155, 1224, 1295, 1330, 1368, 1443, 1520, 1599, 1680, 1727, 1763
Offset: 1

Views

Author

Gus Wiseman, Aug 29 2024

Keywords

Comments

Non-perfect-powers (A007916) are numbers with no proper integer roots.
Also numbers k > 0 such that k is a perfect power (A001597) but k+1 is not.

Examples

			The list of all non-perfect-powers, split into runs, begins:
   2   3
   5   6   7
  10  11  12  13  14  15
  17  18  19  20  21  22  23  24
  26
  28  29  30  31
  33  34  35
  37  38  39  40  41  42  43  44  45  46  47  48
Row n begins with A375703(n), ends with a(n), adds up to A375705(n), and has length A375702(n).
		

Crossrefs

For nonprime numbers: A006093, min A055670, anti-runs A068780, min A005381.
For prime numbers we have A045344.
Inserting 8 after 7 gives A045542.
For nonsquarefree numbers we have A072284(n) + 1, anti-runs A068781.
For squarefree numbers we have A373415, anti-runs A007674.
For prime-powers we have A373674 (min A373673), anti-runs A006549 (A120430).
Non-prime-powers: A373677 (min A373676), anti-runs A255346 (min A373575).
The anti-run version is A375739.
A001597 lists perfect-powers, differences A053289.
A046933 counts composite numbers between primes.
A375736 gives lengths of anti-runs of non-prime-powers, sums A375737.
For runs of non-perfect-powers (A007916):
- length: A375702 = A053289(n+1) - 1
- first: A375703 (same as A216765 with 2 exceptions)
- last: A375704 (this) (same as A045542 with 8 removed)
- sum: A375705

Programs

  • Mathematica
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Max/@Split[Select[Range[100],radQ],#1+1==#2&]//Most
    - or -
    radQ[n_]:=n>1&&GCD@@Last/@FactorInteger[n]==1;
    Select[Range[100],radQ[#]&&!radQ[#+1]&]

Formula

For n > 2 we have a(n) = A045542(n+1).

A261034 Numbers m such that 3*m is squarefree.

Original entry on oeis.org

1, 2, 5, 7, 10, 11, 13, 14, 17, 19, 22, 23, 26, 29, 31, 34, 35, 37, 38, 41, 43, 46, 47, 53, 55, 58, 59, 61, 62, 65, 67, 70, 71, 73, 74, 77, 79, 82, 83, 85, 86, 89, 91, 94, 95, 97, 101, 103, 106, 107, 109, 110, 113, 115, 118, 119, 122, 127, 130, 131
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 07 2015

Keywords

Comments

These are the numbers from A005117 that are not divisible by 3. See the Maple program by Robert Israel. - Wolfdieter Lang, Aug 21 2015
Squarefree numbers divisible by 3: 3, 6, 15, 21, 30, 33, 39, 42, 51, 57, 66, 69, 78, 87, 93, 102, ...

Examples

			10 is in this sequence because 3*10 = 30 is squarefree.
		

Crossrefs

Numbers m such that k*m is squarefree: A005117 (k = 1), A056911 (k = 2), this sequence (k = 3), A274546 (k = 5), A276378 (k = 6).

Programs

  • Magma
    [n: n in [1..200] | IsSquarefree(3*n)];
    
  • Maple
    select(numtheory:-issqrfree, [seq(seq(3*i+j,j=1..2),i=0..1000)]); # Robert Israel, Aug 07 2015
  • Mathematica
    Select[Range[0, 200], SquareFreeQ[3 #] &] (* Vincenzo Librandi, Aug 08 2015 *)
  • PARI
    is(n)=n%3 && issquarefree(n) \\ Charles R Greathouse IV, Aug 07 2015

Formula

a(n) ~ 2*Pi^2*n/9. - Charles R Greathouse IV, Aug 07 2015
Sum_{n>=1} 1/a(n)^s = (3^s)*zeta(s)/((1+3^s)*zeta(2*s)), s>1. - Amiram Eldar, Sep 26 2023

Extensions

Corrected and extended by Vincenzo Librandi, Aug 08 2015

A045372 Primes congruent to {1, 2} mod 5.

Original entry on oeis.org

2, 7, 11, 17, 31, 37, 41, 47, 61, 67, 71, 97, 101, 107, 127, 131, 137, 151, 157, 167, 181, 191, 197, 211, 227, 241, 251, 257, 271, 277, 281, 307, 311, 317, 331, 337, 347, 367, 397, 401, 421, 431, 457, 461, 467
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A045413 (complement), A045344, A045391.

Programs

  • Magma
    [p: p in PrimesUpTo(600) | p mod 5 in [1, 2]]; // Vincenzo Librandi, Aug 10 2012
  • Mathematica
    Select[Prime[Range[100]],MemberQ[{1,2},Mod[#,5]]&] (* Harvey P. Dale, Jul 27 2012 *)

Extensions

Edited by Charles R Greathouse IV, Mar 25 2010

A369962 Numbers k for which gcd(k, A003415(k)) is equal to gcd(k, A276086(k)), where A003415 is the arithmetic derivative, and A276086 is the primorial base exp-function.

Original entry on oeis.org

1, 2, 5, 6, 7, 9, 11, 13, 14, 17, 19, 22, 23, 26, 29, 30, 31, 34, 37, 38, 41, 43, 46, 47, 49, 53, 58, 59, 61, 62, 65, 66, 67, 71, 73, 74, 78, 79, 82, 83, 86, 89, 94, 95, 97, 99, 101, 102, 103, 106, 107, 109, 113, 114, 117, 118, 122, 127, 131, 134, 137, 138, 139, 142, 143, 146, 149, 151, 153, 155, 157, 158, 163, 166
Offset: 1

Views

Author

Antti Karttunen, Feb 07 2024

Keywords

Crossrefs

Cf. A003415, A085731, A276086, A324198, A369961 (characteristic function).
Subsequences: A045344, A369959, A369963 (nonsquarefree terms).

Programs

Formula

{k | A085731(k) == A324198(k)}.

A045391 Primes congruent to {1, 2} mod 7.

Original entry on oeis.org

2, 23, 29, 37, 43, 71, 79, 107, 113, 127, 149, 163, 191, 197, 211, 233, 239, 281, 317, 331, 337, 359, 373, 379, 401, 421, 443, 449, 457, 463, 491, 499, 541, 547, 569, 617, 631, 653, 659, 673, 701, 709, 743, 751
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(1000) | p mod 7 in [1, 2]]; // Vincenzo Librandi, Aug 10 2012
  • Mathematica
    Select[Prime[Range[300]],MemberQ[{1,2},Mod[#,7]]&] (* Vincenzo Librandi, Aug 10 2012 *)
    Select[Flatten[#+{1,2}&/@(7*Range[0,120])],PrimeQ] (* Harvey P. Dale, Sep 15 2019 *)

A282649 The larger term of the pair (a(n), a(n+1)) is always prime.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 6, 11, 8, 13, 9, 17, 10, 19, 12, 23, 14, 29, 15, 31, 16, 37, 18, 41, 20, 43, 21, 47, 22, 53, 24, 59, 25, 61, 26, 67, 27, 71, 28, 73, 30, 79, 32, 83, 33, 89, 34, 97, 35, 101, 36, 103, 38, 107, 39, 109, 40, 113, 42, 127, 44, 131, 45, 137, 46, 139, 48, 149, 49, 151, 50, 157, 51, 163, 52, 167, 54, 173, 55, 179, 56, 181, 57
Offset: 1

Views

Author

Eric Angelini and Jean-Marc Falcoz, Feb 20 2017

Keywords

Comments

The sequence is started with a(1) = 1 and always extended with the smallest integer not yet present and not leading to a contradiction. The sequence is a permutation of the positive integers.
From Bernard Schott, May 15 2019: (Start)
Let p_k = A000040(k) and c_k = A002808(k), the data can be written:
1, p_1, p_2, p_3, c_1, p_4, c_2, p_5, c_3, p_6, c_4, p_7, ...
At the 4th term, begins the alternating pattern:
{p_3, c_1, p_4, c_2, p_5, c_3, ..., p_(m+2), c_m, ...}.
The terms with odd index are 1, p_2, c_1, c_2, c_3, c_4, c_5, ...;
the terms with even index are p_1, p_3, p_4, p_5, p_6, p_7, ... This is A045344. (End)

Examples

			In the 1st pair of integers (1,2) the larger term is (2), which is prime;
in the 2nd pair of integers (2,3) the larger term is (3), which is prime;
in the 3rd pair of integers (3,5) the larger term is (5), which is prime;
in the 4th pair of integers (5,4) the larger term is (5), which is prime;
in the 5th pair of integers (4,7) the larger term is (7), which is prime;
in the 6th pair of integers (7,6) the larger term is (7), which is prime; etc.
		

Crossrefs

Cf. A000040 (prime numbers), A002808 (composite numbers), A045344.

Programs

  • Mathematica
    a = {1}; Do[k = 1; While[Nand[PrimeQ@ Max[a[[n - 1]], k], ! MemberQ[a, k]], k++]; AppendTo[a, k], {n, 2, 120}]; a (* Michael De Vlieger, Feb 20 2017 *)

Formula

From Bernard Schott, May 15 2019: (Start)
n odd: a(1) = 1, a(3) = 3, and for n >= 5, a(n) = A002808((n-3)/2).
n even: a(2) = 2, for n >= 4, a(n) = A000040(n/2 + 1), also,
n even: a(n) = A045344(n/2). (End)
For n > 4, if a(n-1) is prime then a(n) is the smallest composite > a(n-2); otherwise a(n) is the smallest prime > a(n-2). - Bill McEachen, Apr 27 2024

A173474 Numbers n such that n*2^n + 1 is not prime.

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, Feb 19 2010

Keywords

Comments

Complement of "prime Cullen numbers" A005849.
Where a(n)=n for n <= 140, and a(141)=142,..., a(4711)=4712, a(4712)=4714,..., a(5792)=5794, a(5793)=5796,..., a(6607)=6610, a(6608)=6612,..., a(18491)=18495, a(18492)=18497,..., a(32286)=32291, a(32287)=32293,..., a(32462)=32468, a(32463)=32470,..., a(59648)=59655, a(59649)=59657,..., a(90816)=90824, a(90817)=90826,..., a(262403)=262418, a(262404)=262420,..., a(361264)=361274, a(361265)=361276,..., a(481887)=481898, a(481888)=481900,..., a(1354815)=1354827, a(1354816)=1354829,..., a(6328534)=6328547, a(6328535)=6328549,...
Otherwise said, this includes all nonnegative integers except for the "prime Cullen numbers" (more precisely, indices of primes in A002064): 1, 140, 4713, 5795, ... listed in A005849. - M. F. Hasler, Jan 18 2015

Crossrefs

Programs

  • Mathematica
    nnnpQ[n_]:=Module[{c=n 2^n+1},!PrimeQ[c]&&c>=0]; Select[Range[0,100], nnnpQ] (* Harvey P. Dale, Aug 23 2011 *)

Extensions

Corrected and edited by M. F. Hasler, Jan 18 2015
Name edited by Michel Marcus, Nov 02 2017
Showing 1-10 of 23 results. Next