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

A317613 Permutation of the nonnegative integers: lodumo_4 of A047247.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Write n in base 8, then apply the following substitution to the rightmost digit: '0'->'2, '1'->'3', and vice versa. Convert back to decimal.
A self-inverse permutation: a(a(n)) = n.
Array whose columns are, in this order, A047463, A047621, A047451 and A047522, read by rows.

Examples

			a(25) = a('3'1') = '3'3' = 27.
a(26) = a('3'2') = '3'0' = 24.
a(27) = a('3'3') = '3'1' = 25.
a(28) = a('3'4') = '3'4' = 28.
a(29) = a('3'5') = '3'5' = 29.
The sequence as array read by rows:
  A047463, A047621, A047451, A047522;
        2,       3,       0,       1;
        4,       5,       6,       7;
       10,      11,       8,       9;
       12,      13,      14,      15;
       18,      19,      16,      17;
       20,      21,      22,      23;
       26,      27,      24,      25;
       28,      29,      30,      31;
  ...
		

Crossrefs

Programs

  • Magma
    m:=100; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((x^7+x^5+3*x^3-2*x^2-x+2)/((1-x)^2*(x^6+x^4+ x^2+1)))); // G. C. Greubel, Sep 25 2018
  • Mathematica
    Table[(4*(Floor[1/4 Mod[2*n + 4, 8]] - Floor[1/4 Mod[n + 2, 8]]) + 2*n)/2, {n, 0, 100}]
    f[n_] := Block[{id = IntegerDigits[n, 8]}, FromDigits[ Join[Most@ id /. {{} -> {0}}, {id[[-1]] /. {0 -> 2, 1 -> 3, 2 -> 0, 3 -> 1}}], 8]]; Array[f, 67, 0] (* or *)
    CoefficientList[ Series[(x^7 + x^5 + 3x^3 - 2x^2 - x + 2)/((x - 1)^2 (x^6 + x^4 + x^2 + 1)), {x, 0, 70}], x] (* or *)
    LinearRecurrence[{2, -2, 2, -2, 2, -2, 2, -1}, {2, 3, 0, 1, 4, 5, 6, 7}, 70] (* Robert G. Wilson v, Aug 01 2018 *)
  • Maxima
    makelist((4*(floor(mod(2*n + 4, 8)/4) - floor(mod(n + 2, 8)/4)) + 2*n)/2, n, 0, 100);
    
  • PARI
    my(x='x+O('x^100)); Vec((x^7+x^5+3*x^3-2*x^2-x+2)/((1-x)^2*(x^6+x^4+ x^2+1))) \\ G. C. Greubel, Sep 25 2018
    

Formula

a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - 2*a(n-4) + 2*a(n-5) - 2*a(n-6) + 2*a(n-7) - a(n-8), n > 7.
a(n) = (4*(floor(((2*n + 4) mod 8)/4) - floor(((n + 2) mod 8)/4)) + 2*n)/2.
a(n) = lod_4(A047247(n+1)).
a(4*n) = A047463(n+1).
a(4*n+1) = A047621(n+1).
a(4*n+2) = A047451(n+1).
a(4*n+3) = A047522(n+1).
a(A042948(n)) = A047596(n+1).
a(A042964(n+1)) = A047551(n+1).
G.f.: (x^7 + x^5 + 3*x^3 - 2*x^2 - x + 2)/((x-1)^2 * (x^2+1) * (x^4+1)).
E.g.f.: x*exp(x) + cos(x) + sin(x) + cos(x/sqrt(2))*cosh(x/sqrt(2)) + (sqrt(2)*cos(x/sqrt(2)) - sin(x/sqrt(2)))*sinh(x/sqrt(2)).
a(n+8) = a(n) + 8 . - Philippe Deléham, Mar 09 2023
Sum_{n>=3} (-1)^(n+1)/a(n) = 1/6 + log(2). - Amiram Eldar, Mar 12 2023

A047257 Numbers that are congruent to {4, 5} mod 6.

Original entry on oeis.org

4, 5, 10, 11, 16, 17, 22, 23, 28, 29, 34, 35, 40, 41, 46, 47, 52, 53, 58, 59, 64, 65, 70, 71, 76, 77, 82, 83, 88, 89, 94, 95, 100, 101, 106, 107, 112, 113, 118, 119, 124, 125, 130, 131, 136, 137, 142, 143, 148, 149
Offset: 1

Views

Author

Keywords

Comments

Equivalently, numbers m such that 2^m - m is divisible by 3. Indeed, for every prime p, there are infinitely many numbers m such that 2^m - m (A000325) is divisible by p, here are numbers m corresponding to p = 3. - Bernard Schott, Dec 10 2021
Numbers k for which A276076(k) and A276086(k) are multiples of nine. For a simple proof, consider the penultimate digit in the factorial and primorial base expansions of n, A007623 and A049345. - Antti Karttunen, Feb 08 2024

References

  • Michael Doob, The Canadian Mathematical Olympiad & L'Olympiade Mathématique du Canada 1969-1993, Canadian Mathematical Society & Société Mathématique du Canada, Problem 4, 1983, page 158, 1993.

Crossrefs

Cf. A000325.
Similar with: A299174 (p = 2), this sequence (p = 3), A349767 (p = 5).

Programs

Formula

a(n) = 4 + 6*floor(n/2) + n mod 2.
a(n) = 6*n-a(n-1)-3, with a(1)=4. - Vincenzo Librandi, Aug 05 2010
G.f.: ( x*(4+x+x^2) ) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
a(n) = 3*n - (-1)^n. - Wesley Ivan Hurt, Mar 20 2015
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(6*sqrt(3)) - log(2)/3. - Amiram Eldar, Dec 14 2021
E.g.f.: 1 + 3*x*exp(x) - exp(-x). - David Lovler, Aug 25 2022

A047227 Numbers that are congruent to {1, 2, 3, 4} mod 6.

Original entry on oeis.org

1, 2, 3, 4, 7, 8, 9, 10, 13, 14, 15, 16, 19, 20, 21, 22, 25, 26, 27, 28, 31, 32, 33, 34, 37, 38, 39, 40, 43, 44, 45, 46, 49, 50, 51, 52, 55, 56, 57, 58, 61, 62, 63, 64, 67, 68, 69, 70, 73, 74, 75, 76, 79, 80, 81, 82, 85, 86, 87, 88, 91, 92, 93, 94, 97, 98
Offset: 1

Views

Author

Keywords

Comments

a(k)^m is a term for k and m in N. - Jerzy R Borysowicz, Apr 18 2023

Crossrefs

Complement of A047264. Equals A203016 divided by 3.

Programs

  • Magma
    [n: n in [0..100] | n mod 6 in [1..4]]; // Vincenzo Librandi, Jan 06 2013
    
  • Maple
    A047227:=n->(6*n-5-I^(2*n)+(1+I)*I^(1-n)+(1-I)*I^(n-1))/4: seq(A047227(n), n=1..100); # Wesley Ivan Hurt, May 20 2016
  • Mathematica
    Complement[Range[100], Flatten[Table[{6n - 1, 6n}, {n, 0, 15}]]] (* Alonso del Arte, Jul 07 2011 *)
    Select[Range[100], MemberQ[{1, 2, 3, 4}, Mod[#, 6]]&] (* Vincenzo Librandi, Jan 06 2013 *)
  • PARI
    a(n)=([0,1,0,0,0; 0,0,1,0,0; 0,0,0,1,0; 0,0,0,0,1; -1,1,0,0,1]^(n-1)*[1;2;3;4;7])[1,1] \\ Charles R Greathouse IV, May 03 2023

Formula

From Johannes W. Meijer, Jul 07 2011: (Start)
a(n) = floor((n+2)/4) + floor((n+1)/4) + floor(n/4) + 2*floor((n-1)/4) + floor((n+3)/4).
G.f.: x*(1 + x + x^2 + x^3 + 2*x^4)/(x^5 - x^4 - x + 1). (End)
From Wesley Ivan Hurt, May 20 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = (6n - 5 - i^(2n) + (1+i)*i^(1-n) + (1-i)*i^(n-1))/4 where i=sqrt(-1).
a(2n) = A047235(n), a(2n-1) = A047241(n). (End)
E.g.f.: (4 + sin(x) - cos(x) + (3*x - 2)*sinh(x) + 3*(x - 1)*cosh(x))/2. - Ilya Gutkovskiy, May 21 2016
From Wesley Ivan Hurt, May 21 2016: (Start)
a(n) = A047246(n) + 1.
a(n+2) - a(n+1) = A093148(n) for n>0.
a(1-n) = - A047247(n). (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(3)*Pi/12 + 2*log(2)/3 - log(3)/4. - Amiram Eldar, Dec 17 2021

A380475 a(n) is the least term in A380468 that has exactly n prime factors.

Original entry on oeis.org

1, 2, 6, 186, 4686
Offset: 0

Views

Author

Antti Karttunen, Feb 03 2025

Keywords

Comments

If it exists, a(5) > 2^35. - Antti Karttunen, Feb 19 2025
Conjecture: Sequence is finite and a(4) is the last term. This is equivalent to the claim that no arithmetic derivative (A003415) of a product of five or more distinct primes, (i.e., the value of the (n-1)-st elementary symmetric polynomial formed from those n distinct primes) can be formed as a carry-free sum of those n summands in primorial base (A049345). See also A380476 and A380528, A380530.

Examples

			186 = 2*3*31 and A276086(186/2) = 2058 = 2 * 3 * 7^3, A276086(186/3) = 3 * 7^2, A276086(186/31) = 5, whose product =  2^1 * 3^2 * 5^1 * 7^5 = 1512630 = A380459(186), and as all the exponents are less than the corresponding primes, the product is in A048103, and because there are no any smaller number with three prime factors satisfying the same condition (of A380468), 186 is the term a(3) of this sequence. Note that A049345(A003415(186)) = 5121, where the digits are the exponents in the product read from the largest to the smallest prime factor.
See also the example in A380476 about 4686.
		

Crossrefs

Cf. A001221, A001222, A003415, A048103, A049345, A276086, A380459, A380468, A380476 (terms of A380468 with more than three prime factors).

Formula

a(n) = Min_{k in A380468} for which A001221(k) = n.

A380476 Numbers k with at least 4 prime factors such that A380459(k) is in A048103, i.e., has no divisors of the form p^p.

Original entry on oeis.org

4686, 32406, 184866, 209166, 388086, 1099626, 1714866, 2111406, 2166846, 2356206, 3081606, 3303366, 6445806, 11366106, 21621606, 23022366, 39824466, 39826986, 42882846, 43197846, 46043826, 58216686, 61265886, 63603546, 66496506, 66611166, 87941706, 88968246, 92086746, 97117026, 101108706, 103367886, 118743306, 119658066
Offset: 1

Views

Author

Antti Karttunen, Feb 04 2025

Keywords

Comments

Numbers m with four or more distinct prime factors such that their arithmetic derivative (A003415) can be formed as a carryless (or "carry-free") sum (in the primorial base, A049345) of the respective summands. See the example.
The terms are all squarefree and even (see A380468 and A380478 to find out why). Moreover, they are all multiples of six, because A380459(n) = Product_{d|n} A276086(n/d)^A349394(d) applied to a product of 2*p*q*r, with p, q, r three odd primes > 3 would yield three subproducts which would be multiples of 3 (consider A047247), so the 3-adic valuation of the whole product would be >= 3; hence the second smallest prime factor must be 3. For a similar reason, with terms that are product of four primes, the two remaining prime factors are either both of the form 6m+1 (A002476), or they are both of the form 6m-1 (A007528).
It is conjectured that there are no terms with more than four prime factors. See A380475 and A380528, A380530, also A380526.

Examples

			4686 = 2*3*11*71 and taking subproducts of three primes at time, we obtain 2*3*11 = 66, 2*3*71 = 426, 2*11*71 = 1562, 3*11*71 = 2343. Then A380459(4686) = A276086(66) * A276086(426) * A276086(1562) * A276086(2343) = 1622849599205985150 = 2^1 * 3^2 * 5^2 * 7^6 * 11^9 * 13^1, and because all the exponents are less than the corresponding primes, the product is in A048103.
Considering the primorial base expansions of the same summands (subproducts), we obtain
    2100  = A049345(66)
   20100  = A049345(426)
   73010  = A049345(1562)
  101011  = A049345(2343)
  ------
  196221  = A049345(A003415(4686)), with the summands adding together cleanly without any carries.
Note how the primorial base digits at the bottom are the exponents in the product A380459(4686) given above, read from the largest to the smallest prime factor
		

Crossrefs

Intersection of A033987 and A380468.
Subsequence of A005117, A358673, A380478.
Conjectured to be a subsequence of A046386.

Programs

  • PARI
    is_A380476(n) = (issquarefree(n) && (omega(n)>=4) && A380467(n)); \\ Note that issquarefree here is just an optimization as A380467(n) = 1 implies squarefreeness of n.

A169606 a(2n-1) = prime(n+2)-3, a(2n) = prime(n+2)-2.

Original entry on oeis.org

2, 3, 4, 5, 8, 9, 10, 11, 14, 15, 16, 17, 20, 21, 26, 27, 28, 29, 34, 35, 38, 39, 40, 41, 44, 45, 50, 51, 56, 57, 58, 59, 64, 65, 68, 69, 70, 71, 76, 77, 80, 81, 86, 87, 94, 95, 98, 99, 100, 101, 104, 105, 106, 107, 110, 111, 124, 125, 128, 129, 134, 135, 136, 137, 146
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 03 2009

Keywords

Examples

			a(1)=5-3=2; a(2)=5-2=3; a(3)=7-3=4.
		

Crossrefs

Programs

  • Mathematica
    Table[If[OddQ[n],Prime[(n+1)/2+2]-3,Prime[n/2+2]-2],{n,70}] (* Harvey P. Dale, Oct 25 2020 *)
  • PARI
    forprime(p=5,97,print1(p-3", "p-2", ")) \\ Charles R Greathouse IV, May 25 2011

Formula

a(n) ~ 0.5 n log n. - Charles R Greathouse IV, May 25 2011

Extensions

Entries checked by R. J. Mathar, Apr 14 2010
Definition reworded by N. J. A. Sloane, Aug 24 2012
Showing 1-6 of 6 results.