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

A059879 Those n for which the absolute value of A059878[n] is prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 10, 14, 16, 18, 20, 21, 24, 27, 31, 34, 37, 39, 41, 43, 46, 47, 48, 50, 51, 53, 54, 55, 57, 60, 61, 65, 67, 68, 71, 78, 83, 84, 86, 87, 101, 103, 105, 106, 109, 112, 114, 117, 126, 127, 128, 129, 141, 143, 145, 154, 155, 158, 161, 168, 179, 181
Offset: 1

Views

Author

Antti Karttunen, Feb 05 2001

Keywords

Comments

Of the first 511 terms of A059878, 128 are primes.

Crossrefs

Cf. A059877.

Programs

  • Maple
    positions(true,map(isprime,map(abs, A059878))); # positions function given in A059649.

A014437 Odd Fibonacci numbers.

Original entry on oeis.org

1, 1, 3, 5, 13, 21, 55, 89, 233, 377, 987, 1597, 4181, 6765, 17711, 28657, 75025, 121393, 317811, 514229, 1346269, 2178309, 5702887, 9227465, 24157817, 39088169, 102334155, 165580141, 433494437, 701408733, 1836311903, 2971215073, 7778742049, 12586269025
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A360957 (sum of reciprocals).

Programs

  • Magma
    [Fibonacci((3*Floor((n+1)/2)) + (-1)^n): n in [0..50]]; // Vincenzo Librandi, Apr 18 2011
    
  • Maple
    with(combinat):A014437:=proc(n)return fibonacci((3*floor((n+1)/2)) + (-1)^n):end:
    seq(A014437(n),n=0..31); # Nathaniel Johnston, Apr 18 2011
    # second Maple program:
    a:= n-> (<<0|1|0|0>, <0|0|1|0>, <0|0|0|1>, <1|0|4|0>>^n.<<1,1,3,5>>)[1,1]:
    seq(a(n), n=0..33);  # Alois P. Heinz, May 22 2025
  • Mathematica
    RecurrenceTable[{a[n] == 4*a[n-2] + a[n-4], a[0]==1, a[1]==1, a[2]==3, a[3]==5},a,{n,0,500}] (* G. C. Greubel, Oct 30 2015 *)
    Table[ SeriesCoefficient[(-1 - x + x^2 - x^3)/(-1 + 4*x^2 + x^4), {x, 0, n}], {n, 0, 20}] (* Nikolaos Pantelidis, Feb 01 2023 *)
    Select[Fibonacci[Range[50]],OddQ] (* Harvey P. Dale, Sep 01 2023 *)
  • PARI
    Vec((-1-x+x^2-x^3)/(-1+4*x^2+x^4) + O(x^200)) \\ Altug Alkan, Oct 31 2015
    
  • PARI
    apply( A014437(n)=fibonacci(n\/2*3+(-1)^n), [0..30]) \\ M. F. Hasler, Nov 18 2018

Formula

Fibonacci(3n+1) union Fibonacci(3n+2).
a(n) = Fibonacci(3*floor((n+1)/2) + (-1)^n). - Antti Karttunen, Feb 05 2001
G.f.: ( -1-x+x^2-x^3 ) / ( -1+4*x^2+x^4 ). - R. J. Mathar, Feb 16 2011
a(2n) = v-w, a(2n+1) = v+w, with v=A001076(n+1), w=A001076(n). Therefore, a(2n)+a(2n+1) = 2*A001076(n+1). - Ralf Stephan, Aug 31 2013
From Vladimir Reshetnikov, Oct 30 2015: (Start)
a(n) = ((cos(Pi*n/2)-sqrt(phi)*sin(Pi*n/2))/phi^((3*n+2)/2) + (sqrt(phi)*cos(Pi*n/2)^2+sin(Pi*n/2)^2)*phi^((3*n+1)/2))/sqrt(5), where phi=(1+sqrt(5))/2.
E.g.f.: (cos(x/phi^(3/2))/phi - sin(x/phi^(3/2))/sqrt(phi) + cosh(x*phi^(3/2))*phi + sinh(x*phi^(3/2))*sqrt(phi))/sqrt(5).
(End)

Extensions

a(30)-a(31) from Vincenzo Librandi, Apr 18 2011

A059876 a(n) = bin_prime_sum(n).

Original entry on oeis.org

2, 1, 3, 3, 5, 7, 9, -1, 1, 3, 5, 5, 7, 9, 11, 3, 5, 7, 9, 9, 11, 13, 15, 13, 15, 17, 19, 19, 21, 23, 25, -7, -5, -3, -1, -1, 1, 3, 5, 3, 5, 7, 9, 9, 11, 13, 15, 7, 9, 11, 13, 13, 15, 17, 19, 17, 19, 21, 23, 23, 25, 27, 29, -3, -1, 1, 3, 3, 5, 7, 9, 7, 9, 11, 13, 13, 15, 17, 19, 11, 13, 15, 17, 17, 19, 21, 23, 21, 23, 25, 27, 27, 29, 31, 33, 19, 21, 23, 25, 25, 27, 29, 31, 29, 31
Offset: 1

Views

Author

Antti Karttunen, Feb 05 2001

Keywords

Comments

From R. J. Mathar, Nov 12 2011: (Start)
The function bin_prime_sum of an argument n is a sum of three numbers. Let s = A000523(n) be the exponent of the largest power of 2 less than or equal to n and prime=A000040. Then the three terms are:
i) (-1)^(n+1);
ii) sum_{i=1..s} prime(i) * (1 + (-1)^[n/2^i] ); where [..] is the floor bracket;
iii) 1 (if n=1), otherwise prime(s) (if s even) or 0 (if s odd). (End)

Crossrefs

Programs

  • Maple
    with(numtheory); bin_prime_sum := proc(n) local i,s; s := floor_log_2(n); RETURN(((-1)^(n+1)) + add( (((-1)^(floor(n/(2^i))+1))*ithprime(i)),i=1..s) + (`if`((1 = n),1,((`mod`((s+1),2))*ithprime(s)))) ); end;
  • Mathematica
    a[n_] := With[{s = Floor[Log[2, n]]}, (-1)^(n+1) + Sum[(-1)^(Floor[n/2^i] + 1)*Prime[i], {i, 1, s}] + If[1 == n, 1, Mod[s+1, 2]*Prime[s]]]; Array[a, 105] (* Jean-François Alcover, Mar 07 2016, adapted from Maple *)

Formula

a(A059873(n)) = A000040(n).
Showing 1-3 of 3 results.