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

A097723 One fourth of sum of divisors of 4n+3.

Original entry on oeis.org

1, 2, 3, 6, 5, 6, 10, 8, 12, 14, 11, 12, 18, 18, 15, 26, 17, 18, 31, 20, 21, 30, 28, 30, 39, 26, 27, 38, 36, 36, 42, 32, 33, 60, 35, 42, 57, 38, 48, 54, 41, 42, 65, 62, 45, 62, 54, 48, 84, 50, 60, 78, 53, 66, 74, 56, 57, 96, 72, 60, 91, 70, 63, 108, 76, 66, 90, 68, 93, 104, 71, 84, 98
Offset: 0

Views

Author

N. J. A. Sloane, Sep 11 2004

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			1 + 2*x + 3*x^2 + 6*x^3 + 5*x^4 + 6*x^5 + 10*x^6 + 8*x^7 + 12*x^8 + ...
q^3 + 2*q^7 + 3*q^11 + 6*q^15 + 5*q^19 + 6*q^23 + 10*q^27 + 8*q^31 + ...
		

References

  • Nathan J. Fine, Basic Hypergeometric Series and Applications, Amer. Math. Soc., 1988; p. 76, Eq. (31.54).

Crossrefs

Programs

  • Mathematica
    Table[DivisorSigma[1, 4n+3]/4, {n, 0, 72}] (* Jean-François Alcover, Nov 30 2015 *)
  • PARI
    {a(n) = if( n<0, 0, sigma(4*n + 3) / 4)} /* Michael Somos, Jul 05 2006 */
    
  • PARI
    {a(n) = local(A); if( n<0, 0, A = x * O(x^n); polcoeff( (eta(x^2 + A) * eta(x^4 + A)^2 / eta(x + A))^2, n))} /* Michael Somos, Jul 05 2006 */

Formula

Euler transform of period 4 sequence [2, 0, 2, -4, ...]. - Vladeta Jovovic, Sep 14 2004
Expansion of q^(-3/4) * eta^2(q^2) * eta^4(q^4) / eta^2(q) in powers of q. - Michael Somos, Jul 05 2006
Expansion of q^(-3/2) * (theta_2(q) * theta_2(q^2))^2 / 16 in powers of q^2. - Michael Somos, Jul 05 2006
Expansion of (psi(x) * psi(x^2))^2 in powers of x where psi() is a Ramanujan theta function.
a(n) = sigma(4*n + 3) / 4 = A000203(4*n + 3) / 4.
a(n) = number of solutions of 8*n + 6 = x^2 + y^2 + 2*z^2 + 2*w^2 in positive odd integers.
a(n) = number of representations of n as the sum of two triangular numbers and twice two triangular numbers. - Michael Somos, Jul 05 2006
G.f.: (Product_{k>0} (1 - x^(4*k))^2 / (1 - x^(2*k - 1)))^2.
a(n) = A000203(A004767(n))/4. - Michel Marcus, Nov 30 2015
Sum_{k=0..n} a(k) = (Pi^2/16) * n^2 + O(n*log(n)). - Amiram Eldar, Dec 17 2022

A274650 Triangle read by rows: T(n,k), (0 <= k <= n), in which each term is the least nonnegative integer such that no row, column, diagonal, or antidiagonal contains a repeated term.

Original entry on oeis.org

0, 1, 2, 3, 0, 1, 2, 4, 3, 5, 5, 1, 0, 2, 3, 4, 3, 5, 1, 6, 7, 6, 7, 2, 0, 5, 4, 8, 8, 5, 9, 4, 7, 2, 10, 6, 7, 10, 8, 3, 0, 6, 9, 5, 4, 11, 6, 12, 7, 1, 8, 3, 10, 9, 13, 9, 8, 4, 11, 2, 0, 1, 12, 6, 7, 10, 10, 11, 7, 12, 4, 3, 2, 9, 8, 14, 13, 15, 12, 9, 10, 6, 8, 1, 0, 11, 7, 4, 16, 14, 17
Offset: 0

Views

Author

Omar E. Pol, Jul 02 2016

Keywords

Comments

Similar to A274528, but the triangle here is a right triangle.
The same rule applied to an equilateral triangle gives A274528.
By analogy, the offset for both rows and columns is the same as the offset of A274528.
We construct the triangle by reading from left to right in each row, starting with T(0,0) = 0.
Presumably every diagonal and every column is also a permutation of the nonnegative integers, but the proof does not seem so straightforward. Of course neither the rows nor the antidiagonals are permutations of the nonnegative integers, since they are finite in length.
Omar E. Pol's conjecture that every column and every diagonal of the triangle is a permutation of the nonnegative integers is true: see the link. - N. J. A. Sloane, Jun 07 2017
It appears that the numbers generally appear for the first time in or near the right border of the triangle.
Theorem 1: the middle diagonal gives A000004 (the zero sequence).
Proof: T(0,0) = 0 by definition. For the next rows we have that in row 1 there are no zeros because the first term belongs to a column that contains a zero and the second term belongs to a diagonal that contains a zero. In row 2 the unique zero is T(2,1) = 0 because the preceding term belongs to a column that contains a zero and the following term belongs to a diagonal that contains a zero. Then we have two recurrences for all rows of the triangle:
a) If T(n,k) = 0 then row n+1 does not contain a zero because every term belongs to a column that contains a zero or it belongs to a diagonal that contains a zero.
b) If T(n,k) = 0 the next zero is T(n+2,k+1) because every preceding term in row n+2 is a positive integer because it belongs to a column that contains a zero and, on the other hand, the column, the diagonal and the antidiagonal of T(n+2,k+1) do not contain zeros.
Finally, since both T(n,k) = 0 and T(n+2,k+1) = 0 are located in the middle diagonal, the other terms of the middle diagonal are zeros, or in other words: the middle diagonal gives A000004 (the zero sequence). QED
Theorem 2: all zeros are in the middle diagonal.
Proof: consider the first n rows of the triangle. Every element located above or at the right-hand side of the middle diagonal must be positive because it belongs to a diagonal that contains one of the zeros of the middle diagonal. On the other hand every element located below the middle diagonal must be positive because it belongs to a column that contains one of the zeros of the middle diagonal, hence there are no zeros outside of the middle diagonal, or in other words: all zeros are in the middle diagonal. QED
From Hartmut F. W. Hoft, Jun 12 2017: (Start)
T(2k,k) = 0, for all k >= 0, and T(n,{(n-1)/2,(n+2)/2,(n-2)/2,(n+1)/2}) = 1, for all n >= 0 with n mod 8 = {1,2,4,5} respectively, and no 0's or 1's occur in other positions. The triangle of positions of 0's and 1's for this sequence is the triangle in the Comment section of A274651 with row and column indices and values shifted down by one.
The sequence of rows containing 1's is A047613 (n mod 8 = {1,2,4,5}), those containing only 1's is A016813 (n mod 8 = {1,5}), those containing both 0's and 1's is A047463 (n mod 8 = {2,4}), those containing only 0's is A047451 (n mod 8 = {0,6}), and those containing neither 0's nor 2's is A004767 (n mod 8 = {3,7}).
(End)

Examples

			Triangle begins:
   0;
   1,  2;
   3,  0,  1;
   2,  4,  3,  5;
   5,  1,  0,  2,  3;
   4,  3,  5,  1,  6,  7;
   6,  7,  2,  0,  5,  4,  8;
   8,  5,  9,  4,  7,  2, 10,  6;
   7, 10,  8,  3,  0,  6,  9,  5,  4;
  11,  6, 12,  7,  1,  8,  3, 10,  9, 13;
   9,  8,  4, 11,  2,  0,  1, 12,  6,  7, 10;
  10, 11,  7, 12,  4,  3,  2,  9,  8, 14, 13, 15;
  12,  9, 10,  6,  8,  1,  0, 11,  7,  4, 16, 14, 17;
  ...
From _Omar E. Pol_, Jun 07 2017: (Start)
The triangle may be reformatted as an isosceles triangle so that the zero sequence (A000004) appears in the central column (but note that this is NOT the way the triangle is constructed!):
.
.                    0;
.                  1,  2;
.                3,  0,  1;
.              2,  4,  3,  5;
.            5,  1,  0,  2,  3;
.          4,  3,  5,  1,  6,  7;
.        6,  7,  2,  0,  5,  4,  8;
.     8,   5,  9,  4,  7,  2, 10,  6;
.   7,  10,  8,  3,  0,  6,  9,  5,  4;
...
(End)
		

Crossrefs

Cf. A000004 (middle diagonal).
Cf. A046092 (indices of the zeros).
Every diagonal and every column of the right triangle is a permutation of A001477.
The left and right edges of the right triangle give A286294 and A286295.
Cf. A274651 is the same triangle but with 1 added to every entry.
Other sequences of the same family are A269526, A274528, A274820, A274821, A286297, A288530, A288531.
Sequences mentioned in N. J. A. Sloane's proof are A000170, A274616 and A287864.
Cf. A288384.
See A308179, A308180 for a very similar triangle.

Programs

  • Mathematica
    (* function a274651[] is defined in A274651 *)
    (* computation of rows 0 ... n-1 *)
    a274650[n_] := a274651[n]-1
    Flatten[a274650[13]] (* data *)
    TableForm[a274650[13]] (* triangle *)
    (* Hartmut F. W. Hoft, Jun 12 2017 *)
  • PARI
    See Links section.

Formula

T(n,k) = A274651(n+1,k+1) - 1.

A004780 Binary expansion contains 2 adjacent 1's.

Original entry on oeis.org

3, 6, 7, 11, 12, 13, 14, 15, 19, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 35, 38, 39, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 67, 70, 71, 75, 76, 77, 78, 79, 83, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100
Offset: 1

Views

Author

Keywords

Comments

Complement of A003714. It appears that n is in the sequence if and only if C(3n,n) is even. - Benoit Cloitre, Mar 09 2003
Since the binary representation of these numbers contains two adjacent 1's, so for these values of n, we will have (n XOR 2n XOR 3n) != 0, and thus a two player Nim game with three heaps of (n, 2n, 3n) stones will be a winning configuration for the first player. - V. Raman, Sep 17 2012
A048728(a(n)) > 0. - Reinhard Zumkeller, May 13 2014
The set of numbers x such that Or(x,3*x) <> 3*x. - Gary Detlefs, Jun 04 2024

Crossrefs

Complement: A003714.
Subsequences (apart from any initial zero-term): A001196, A004755, A004767, A033428, A277335.

Programs

  • Haskell
    a004780 n = a004780_list !! (n-1)
    a004780_list = filter ((> 1) . a048728) [1..]
    -- Reinhard Zumkeller, May 13 2014
    
  • Maple
    q:= n-> verify([1$2], Bits[Split](n), 'sublist'):
    select(q, [$0..200])[];  # Alois P. Heinz, Oct 22 2021
  • PARI
    is(n)=bitand(n,n+n)>0 \\ Charles R Greathouse IV, Sep 19 2012
    
  • Python
    from itertools import count, islice
    def A004780_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:n&(n<<1), count(max(startvalue,1)))
    A004780_list = list(islice(A004780_gen(),30)) # Chai Wah Wu, Jul 13 2022

Formula

a(n) ~ n. - Charles R Greathouse IV, Sep 19 2012

Extensions

Offset corrected by Reinhard Zumkeller, Jul 28 2010

A336700 Numbers k such that the odd part of (1+k) divides (1 + odd part of sigma(k)).

Original entry on oeis.org

1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 2431, 2943, 3775, 4095, 8191, 13311, 14335, 16383, 17407, 21951, 22527, 32767, 34335, 44031, 57855, 65535, 85375, 131071, 204799, 262143, 376831, 524287, 923647, 1048575, 1562623, 1632255, 2056191, 2097151, 2744319, 4194303, 6815743, 8388607, 8781823, 10059775, 16777215
Offset: 1

Views

Author

Antti Karttunen, Aug 02 2020

Keywords

Comments

Numbers k for which A337194(k) = 1+A161942(k) is a multiple of A000265(1+k).
Conjecture: After 1, all terms are of the form 4u+3 (in A004767). If this could be proved, then it would refute at once the existence of both the odd perfect numbers and the quasiperfect numbers. Concentrating on the latter is probably easier, as it is known that all quasiperfect numbers must be odd squares, thus k is of the form 4u+1, in which case the condition given in A336701 that A000265(1+A000265(sigma(k))) must be equal to A000265(1+k) reduces to a simpler form, A000265(1+sigma(k)) = (1+k)/2, and as k = s^2, with s odd, so (s^2 + 1)/2 should divide 1+sigma(s^2). Does that condition allow any other solutions than s=1 ? See A337339.

Crossrefs

Subsequences: A000225, A336701 (terms where the quotient is a power of 2).

Programs

  • Mathematica
    Block[{f}, f[n_] := n/2^IntegerExponent[n, 2]; Select[Range[2^20], Mod[f[1 + f[DivisorSigma[1, #]]], f[1 + #]] == 0 &] ] (* Michael De Vlieger, Aug 22 2020 *)
  • PARI
    A000265(n) = (n>>valuation(n,2));
    isA336700(n) = !((1+A000265(sigma(n)))%A000265(1+n));

A369252 Arithmetic derivative applied to the numbers of the form p*q*r where p,q,r are (not necessarily distinct) odd primes.

Original entry on oeis.org

27, 39, 51, 55, 75, 71, 87, 75, 91, 111, 103, 123, 95, 119, 147, 131, 119, 151, 183, 151, 135, 195, 167, 155, 231, 147, 199, 191, 187, 255, 167, 267, 211, 291, 195, 215, 247, 191, 263, 215, 327, 251, 247, 363, 203, 375, 311, 271, 255, 239, 411, 231, 311, 343, 299, 231, 435, 359, 331, 447, 311, 263, 391, 483, 263
Offset: 1

Views

Author

Antti Karttunen, Jan 22 2024

Keywords

Comments

The table showing the possible modulo 3 combinations for p, q, r and the sum ((p*q) + (p*r) + (q*r)):
| p | q | r | sum ((p*q) + (p*r) + (q*r)) (mod 3)
--+------+------+------+----------------------------------------
| 0 | 0 | 0 | 0, p=q=r=3, sum is 27.
--+------+------+------+----------------------------------------
| 0 | 0 | +/-1 | 0, p=q=3, r > 3.
--+------+------+------+----------------------------------------
| 0 | +1 | +1 | +1
--+------+------+------+----------------------------------------
| 0 | -1 | -1 | +1
--+------+------+------+----------------------------------------
| 0 | -1 | +1 | -1
--+------+------+------+----------------------------------------
| 0 | +1 | -1 | -1
--+------+------+------+----------------------------------------
| +1 | +1 | +1 | 0
--+------+------+------+----------------------------------------
| -1 | -1 | -1 | 0
--+------+------+------+----------------------------------------
| -1 | +1 | +1 | -1, regardless of the order, thus x3.
--+------+------+------+----------------------------------------
| +1 | -1 | -1 | -1, regardless of the order, thus x3.
--+------+------+------+----------------------------------------
Notably a(n) is a multiple of 3 only when A046316(n) is either a multiple of 9, or all primes p, q and r are either == +1 (mod 3) or all are == -1 (mod 3), and the case a(n) == +1 (mod 3) is only possible when A046316(n) is a multiple of 3, but not of 9, and furthermore, it is required that r == q (mod 3). See how these combinations affects sequences like A369241, A369245, A369450, A369451, A369452.
For n=1..9 the number of terms of the form 3k, 3k+1 and 3k+2 in range [1..10^n-1] are:
6, 2, 1,
39, 22, 38,
291, 209, 499,
2527, 1884, 5588,
23527, 17020, 59452,
227297, 156240, 616462,
2232681, 1453030, 6314288,
22119496, 13661893, 64218610,
220098425, 129624002, 650277572.
It seems that 3k+2 terms are slowly gaining at the expense of 3k+1 terms when n grows, while the density of the multiples of 3 might converge towards a limit.

Crossrefs

Cf. A369251 (same sequence sorted into ascending order, with duplicates removed).
Cf. A369464 (numbers that do not occur in this sequence).
Cf. also the trisections of A369055: A369460, A369461, A369462 and their partial sums A369450, A369451, A369452, also A369241, A369245.
Only terms of A004767 occur here.

Formula

a(n) = A003415(A046316(n)).

A016838 a(n) = (4n + 3)^2.

Original entry on oeis.org

9, 49, 121, 225, 361, 529, 729, 961, 1225, 1521, 1849, 2209, 2601, 3025, 3481, 3969, 4489, 5041, 5625, 6241, 6889, 7569, 8281, 9025, 9801, 10609, 11449, 12321, 13225, 14161, 15129, 16129, 17161, 18225
Offset: 0

Views

Author

Keywords

Comments

If Y is a fixed 2-subset of a (4n+1)-set X then a(n-1) is the number of 3-subsets of X intersecting Y. - Milan Janjic, Oct 21 2007
A bisection of A016754. Sequence arises from reading the line from 9, in the direction 9, 49, ... in the square spiral whose vertices are the squares A000290. - Omar E. Pol, May 24 2008
Using (n,n+1) to generate a Pythagorean triangle with sides of lengths xJ. M. Bergot, Jul 17 2013

Crossrefs

Programs

Formula

Denominators of first differences Zeta[2,(4n-1)/4]-Zeta[2,(4(n+1)-1)/4]. - Artur Jasinski, Mar 03 2010
From George F. Johnson, Oct 03 2012: (Start)
G.f.: (9+22*x+x^2)/(1-x)^3.
a(n+1) = a(n) + 16 + 8*sqrt(a(n)).
a(n+1) = 2*a(n) - a(n-1) + 32 = 3*a(n) - 3*a(n-1) + a(n-2).
a(n-1)*a(n+1) = (a(n)-16)^2; a(n+1) - a(n-1) = 16*sqrt(a(n)).
a(n) = A016754(2*n+1) = (A004767(n))^2.
(End)
Sum_{n>=0} 1/a(n) = Pi^2/16 - G/2, where G is the Catalan constant (A006752). - Amiram Eldar, Jun 28 2020
Product_{n>=0} (1 - 1/a(n)) = Gamma(3/4)^2/sqrt(Pi) = A068465^2 * A087197. - Amiram Eldar, Feb 01 2021

A091236 Nonprimes of form 4k+3.

Original entry on oeis.org

15, 27, 35, 39, 51, 55, 63, 75, 87, 91, 95, 99, 111, 115, 119, 123, 135, 143, 147, 155, 159, 171, 175, 183, 187, 195, 203, 207, 215, 219, 231, 235, 243, 247, 255, 259, 267, 275, 279, 287, 291, 295, 299, 303, 315, 319, 323, 327, 335, 339, 343, 351, 355, 363
Offset: 1

Views

Author

Labos Elemer, Feb 24 2004

Keywords

Comments

If we define f(n) to be the number of primes (counted with multiplicity) of the form 4k + 3 that divide n, then with this sequence f(a(n)) is always odd. For example, 95 is divisible by 17 and 99 is divisible by 3 (twice) and 11. - Alonso del Arte, Jan 13 2016
Complement of A002145 with respect to A004767. - Michel Marcus, Jan 17 2016
With the Jan 05 2004 Jovovic comment on A078703: The number of 1 and -1 (mod 4) divisors of a(n) are identical. Proof: each number 3 (mod 4) is trivially not a sum of two squares. The number of solutions of n as a sum of two squares is r_2(n) = 4*(d_1(n) - d_3(n)), where d_k(n) is the number of k (mod 4) divisors of n. See e.g., Grosswald, pp. 15-16 for the proof of Jacobi. - Wolfdieter Lang, Jul 29 2016

Examples

			27 = 4 * 6 + 3 = 3^3.
35 = 4 * 8 + 3 = 5 * 7.
a(8) = 75 with 2*A078703(19) = 6 divisors [1, 3, 5, 15, 25, 75], which are 1, -1, 1, -1, 1, -1 (mod 4). - _Wolfdieter Lang_, Jul 29 2016
		

References

  • E. Grosswald, Representations of Integers as Sums of Squares. Springer-Verlag, NY, 1985.

Crossrefs

Programs

  • Maple
    A091236 := proc(n)
        option remember  ;
        local a;
        if n = 1 then
            15 ;
        else
            for a from procname(n-1)+1 do
                if not isprime(a) and modp(a,4) = 3 then
                    return a;
                end if;
            end do;
        end if;
    end proc:
    seq(A091236(n),n=1..20) ; # R. J. Mathar, Jul 20 2025
  • Mathematica
    Select[Range[1000], !PrimeQ[#] && IntegerQ[(# - 3)/4] &] (* Harvey P. Dale, Aug 16 2013 *)
    Select[4Range[100] - 1, Not[PrimeQ[#]] &] (* Alonso del Arte, Jan 13 2016 *)
  • PARI
    lista(nn) = for(n=1, nn, if(!isprime(k=4*n+3), print1(k, ", "))); \\ Altug Alkan, Jan 17 2016

A165601 Midpoint height of Jacobi-bridge, computed for 4n+3. a(n) = Sum_{i=0..(2n+1)} J(i,4n+3), where J(i,m) is the Jacobi symbol.

Original entry on oeis.org

1, 1, 3, 2, 3, 3, 1, 3, 6, 4, 3, 5, 6, 4, 9, 2, 3, 7, 2, 5, 9, 6, 6, 8, 0, 5, 9, 8, 6, 10, 6, 5, 15, 2, 9, 10, 0, 7, 12, 10, 3, 11, 6, 2, 15, 8, 6, 13, 12, 9, 12, 0, 9, 14, 12, 7, 15, 12, 6, 15, 1, 6, 21, 12, 12, 13, 6, 11, 0, 6, 9, 14, 12, 8, 24, 10, 9, 19, 0, 10, 12, 12, 9, 18, 18, 1, 15
Offset: 0

Views

Author

Antti Karttunen, Oct 06 2009

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[JacobiSymbol[i, 4n + 3], {i, 0, 2n + 1}], {n, 0, 100}] (* Indranil Ghosh, May 13 2017 *)
  • PARI
    a(n) = sum(i=0, 2*n + 1, kronecker(i, 4*n + 3)); \\ Indranil Ghosh, May 13 2017
    
  • Python
    from sympy import jacobi_symbol as J
    def a(n): return sum([J(i, 4*n + 3) for i in range(2*n + 2)]) # Indranil Ghosh, May 13 2017

A292377 a(1) = 0, and for n > 1, a(n) = a(A252463(n)) + [n == 3 (mod 4)].

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 2, 0, 0, 1, 3, 1, 3, 2, 2, 0, 3, 0, 4, 1, 1, 3, 5, 1, 0, 3, 1, 2, 5, 2, 6, 0, 2, 3, 3, 0, 6, 4, 4, 1, 6, 1, 7, 3, 1, 5, 8, 1, 0, 0, 4, 3, 8, 1, 2, 2, 3, 5, 9, 2, 9, 6, 2, 0, 2, 2, 10, 3, 4, 3, 11, 0, 11, 6, 1, 4, 3, 4, 12, 1, 0, 6, 13, 1, 4, 7, 6, 3, 13, 1, 3, 5, 5, 8, 5, 1, 13, 0, 3, 0, 13, 4, 14, 3, 2
Offset: 1

Views

Author

Antti Karttunen, Sep 17 2017

Keywords

Comments

For numbers > 1, iterate the map x -> A252463(x) which divides even numbers by 2 and shifts every prime in the prime factorization of odd n one index step towards smaller primes. a(n) counts the numbers of the form 4k+3 encountered until 1 has been reached. The count includes also n itself if it is of the form 4k+3 (A004767).
In other words, locate the node which contains n in binary tree A005940 and traverse from that node towards the root, counting all numbers of the form 4k+3 that occur on the path.

Crossrefs

Programs

  • Mathematica
    a[1] = 0; a[n_] := a[n] = a[Which[n == 1, 1, EvenQ@ n, n/2, True, Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n]] + Boole[Mod[n, 4] == 3]; Array[a, 105]

Formula

a(1) = 0, and for n > 1, a(n) = a(A252463(n)) + floor((n mod 4)/3).
Equivalently, a(2n) = a(n), and for odd numbers n > 1, a(n) = a(A064989(n)) + [n == 3 (mod 4)].
a(n) = A000120(A292383(n)).
Other identities. For n >= 1:
a(n) >= A292376(n).
a(A000040(n)) = A267098(n).
1 + a(n) - A292375(n) = A292378(n).
For n >= 2, a(n) + A292375(n) = A061395(n).

A047529 Numbers that are congruent to {1, 3, 7} mod 8.

Original entry on oeis.org

1, 3, 7, 9, 11, 15, 17, 19, 23, 25, 27, 31, 33, 35, 39, 41, 43, 47, 49, 51, 55, 57, 59, 63, 65, 67, 71, 73, 75, 79, 81, 83, 87, 89, 91, 95, 97, 99, 103, 105, 107, 111, 113, 115, 119, 121, 123, 127, 129, 131, 135, 137, 139, 143, 145, 147, 151, 153, 155, 159
Offset: 1

Views

Author

Keywords

Comments

Terms that occur on the first two rows of array A257852. Odd numbers that are not of the form 4k+1, where k is an odd number. - Antti Karttunen, Jun 06 2024

Examples

			G.f. = x + 3*x^2 + 7*x^3 + 9*x^4 + 11*x^5 + 15*x^6 + 17*x^7 + 19*x^8 + 23*x^9 + ...
		

Crossrefs

Setwise difference A005408 \ A004770.
Disjoint union of A004767 and A017077; see A257852.

Programs

  • Magma
    [n : n in [0..150] | n mod 8 in [1, 3, 7]]; // Wesley Ivan Hurt, Jun 13 2016
  • Maple
    A047529:=n->(24*n+2*sqrt(3)*sin(2*Pi*n/3)+6*cos(2*Pi*n/3)-15)/9: seq(A047529(n), n=1..100); # Wesley Ivan Hurt, Jun 13 2016
  • Mathematica
    Select[Range[150], MemberQ[{1,3,7}, Mod[#,8]]&] (* Harvey P. Dale, May 02 2011 *)
    LinearRecurrence[{1, 0, 1, -1}, {1, 3, 7, 9}, 100] (* Vincenzo Librandi, Jun 14 2016 *)
  • PARI
    Vec(x*(x^3+4*x^2+2*x+1)/((x-1)^2*(x^2+x+1)) + O(x^100)) \\ Colin Barker, Nov 12 2015
    
  • PARI
    {a(n) = n\3 * 8 + [-1, 1, 3][n%3 + 1]}; /* Michael Somos, Nov 15 2015 */
    

Formula

a(n) = (24*n+2*sqrt(3)*sin(2*Pi*n/3)+6*cos(2*Pi*n/3)-15)/9. - Fred Daniel Kline, Nov 12 2015
From Colin Barker, Nov 12 2015: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
G.f.: x*(x^3+4*x^2+2*x+1) / ((x-1)^2*(x^2+x+1)). (End)
a(n+3) = a(n) + 8 for all n in Z. - Michael Somos, Nov 15 2015
a(3k) = 8k-1, a(3k-1) = 8k-5, a(3k-2) = 8k-7. - Wesley Ivan Hurt, Jun 13 2016
a(n) = 8 * floor((n-1) / 3) + 2^(((n-1) mod 3) + 1) - 1. - Fred Daniel Kline, Aug 09 2016
a(n) = 2*(n + floor(n/3)) - 1. - Wolfdieter Lang, Sep 10 2021
Previous Showing 31-40 of 218 results. Next