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.

A376599 Second differences of consecutive non-prime-powers inclusive (A024619). First differences of A375735.

This page as a plain text file.
%I A376599 #12 Oct 03 2024 08:32:07
%S A376599 -2,0,-1,2,-1,-1,0,1,0,0,0,1,-2,0,0,1,-1,0,1,0,-1,0,1,0,-1,0,1,-1,0,0,
%T A376599 0,1,0,-1,1,-1,1,-1,0,1,0,-1,0,0,0,1,0,0,-1,0,0,0,1,-1,0,0,0,0,0,1,-1,
%U A376599 0,1,0,-1,0,1,0,-1,0,1,-1,0,0,0,0,0,1,-1,0
%N A376599 Second differences of consecutive non-prime-powers inclusive (A024619). First differences of A375735.
%C A376599 Inclusive means 1 is a prime-power but not a non-prime-power. For the exclusive version, shift left once.
%e A376599 The non-prime-powers inclusive (A024619) are:
%e A376599   6, 10, 12, 14, 15, 18, 20, 21, 22, 24, 26, 28, 30, 33, 34, 35, 36, 38, 39, 40, ...
%e A376599 with first differences (A375735):
%e A376599   4, 2, 2, 1, 3, 2, 1, 1, 2, 2, 2, 2, 3, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, ...
%e A376599 with first differences (A376599):
%e A376599   -2, 0, -1, 2, -1, -1, 0, 1, 0, 0, 0, 1, -2, 0, 0, 1, -1, 0, 1, 0, -1, 0, 1, 0, ...
%t A376599 Differences[Select[Range[100],!(#==1||PrimePowerQ[#])&],2]
%o A376599 (Python)
%o A376599 from sympy import primepi, integer_nthroot
%o A376599 def A376599(n):
%o A376599     def iterfun(f,n=0):
%o A376599         m, k = n, f(n)
%o A376599         while m != k: m, k = k, f(k)
%o A376599         return m
%o A376599     def f(x): return int(n+1+sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
%o A376599     return (a:=iterfun(f,n))-((b:=iterfun(lambda x:f(x)+1,a))<<1)+iterfun(lambda x:f(x)+2,b) # _Chai Wah Wu_, Oct 02 2024
%Y A376599 The version for A000002 is A376604, first differences of A054354.
%Y A376599 For first differences we had A375735, ones A375713(n) - 1.
%Y A376599 Positions of zeros are A376600, complement A376601.
%Y A376599 A000961 lists prime-powers inclusive, exclusive A246655.
%Y A376599 A007916 lists non-perfect-powers.
%Y A376599 A057820 gives first differences of prime-powers inclusive, first appearances A376341, sorted A376340.
%Y A376599 A321346/A321378 count integer partitions without prime-powers, factorizations A322452.
%Y A376599 For non-prime-powers: A024619/A361102 (terms), A375735/A375708 (first differences), A376600 (inflections and undulations), A376601 (nonzero curvature).
%Y A376599 For second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376562 (non-perfect-power), A376590 (squarefree), A376593 (nonsquarefree), A376596 (prime-power).
%Y A376599 Cf. A025475, A053707, A064113, A093555, A174965, A251092, A333254, A376653, A376654.
%K A376599 sign
%O A376599 1,1
%A A376599 _Gus Wiseman_, Oct 02 2024